/*------COMMON STYLE-----*/
* { margin: 0; padding: 0; box-sizing: border-box; }


body {
  font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 200;
  background: #fff;
  min-height: 100vh;
}


.grid {
  position: relative;
  width: 90%;
  margin: 50px auto 0 auto;
  opacity: 0;
  flex: 1 0 auto;
  min-height: calc(100vh - 200px); 
  transition: opacity 0.3s ease-in;
}

.grid.loaded {
  opacity: 1;
}

#header-placeholder {
  flex-shrink: 0;
}

#footer-placeholder {
  flex-shrink: 0;
  margin-top: auto;
}

.card {
  position: absolute;
  background: #fff;
  border-radius: 30px;
  padding: 20px;
  margin: 0;
  box-shadow: 0 20px 50px rgba(0,0,0,0.35);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  z-index: 1;
}

.card::before {
  content: '';
  position: absolute;
  top: -20px; left: -20px; right: -20px; bottom: -20px;
  border-radius: 45px;
  background: rgba(244,244,244,0.5);
  transition: background 0.3s ease;
  z-index: -1;
}

.card:hover::before {
  background: rgba(255,255,255,0.6);
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 30px 60px rgba(0,0,0,0.35);
}

.mode-dropdown { text-align: center; }

.dropdown-btn {
  background: rgba(255,255,255,0.9);
  color: #1d1d1f;
  padding: 14px 32px;
  border: 2px solid rgba(220,220,235,0.5);
  border-radius: 16px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.dropdown-btn:hover {
  background: #fff;
  border-color: rgba(200,200,235,0.7);
}

.dropdown-content {
    display: none;
    position: absolute;
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(20px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.18);
    border-radius: 22px;
    border: 4px solid rgba(220,220,235,0.45);
    pointer-events: auto;
    opacity: 0;
    transition: opacity 0.3s ease;
    white-space: nowrap;
    text-align: center;
    min-width: 0;
    z-index: 2000;
}

.dropdown-content.show {
    display: block;
    opacity: 1;
}

.dropdown-content a {
  color: #1d1d1f;
  padding: 15px 25px;
  text-decoration: none;
  display: block;
  font-size: 15px;
  font-weight: 500;
  border-bottom: 2px solid rgba(220,220,235,0.3);
  cursor: pointer;
}
.dropdown-content a:last-child { border-bottom: none; }
.dropdown-content a:hover { background: rgba(245,245,255,0.85); padding-left: 35px; }

.title .main-title {
    font-size: 18px;
    font-weight: 300;
    color: #1d1d1f;
    text-align: center;
    margin-bottom: 15px;
}

.title .sub-title {
    font-size: 16px;
    color: #ffffff;
    background: linear-gradient(134deg, rgb(248, 5, 5), rgb(250, 0, 247));
    padding: 10px 16px;
    border-radius: 10px;
    margin-top: 15px;
    margin-bottom: 15px;
    width: fit-content;   
    display: block;        
    margin-left: auto;     
    margin-right: auto;    
    text-align: center;    
}




/* ACCORDION */

.accordion-header {
    width: 100%;
    cursor: pointer;
    background: #eee;
    border: none;
    padding: 10px 15px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 200;
    text-align: left;
    transition: background 0.3s ease;
}

.accordion-header:hover {
    background: #f0f0f5;
}

.accordion-icon {
    float: right;
    font-size: 18px;
    font-weight: 100;
    transition: transform 0.3s ease;
}

.accordion-content {
    display: none; 
    overflow: hidden;
    background: transparent;
    border-radius: 15px;
    margin-top: 10px;
    padding: 0 5px;
}

.accordion-content p {
    color: #000000;
}

.customHyperlink {
    color: #007aff;
    text-decoration: underline;
}





/*-------------------Chat app-----------------*/

.title-card {
  text-align: center;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.main-title {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 10px;
}

.sub-title {
  font-size: 16px;
  opacity: 0.9;
}

/* ============================================================================
   QUICK ACTIONS CARD
   ============================================================================ */
.actions-card {
  padding: 20px;
}

.static-container {
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: 15px;
  flex-wrap: wrap;
}

.static-container button {
  font-weight: 500;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: transparent;
  color: #666;
  border: none;
  cursor: pointer;
  transition: opacity 0.3s ease;
  padding: 10px;
}

.static-container button:hover {
  opacity: 0.8;
}

.child1 {
  background: linear-gradient(to bottom right, #f5f3f3, #dfd9e0);
  min-width: 60px;
  min-height: 60px;
  border-radius: 50%;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  transition: 0.3s;
}

.static-container button:hover .child1 {
  background: linear-gradient(to bottom right, #f68282, #f366ff);
  color: white;
}

/* ============================================================================
   CHAT CARD
   ============================================================================ */
.chat-card {
  min-height: 500px;
  display: flex;
  flex-direction: column;
}

.chat-box {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  background: transparent;
  border-radius: 10px;
  margin-bottom: 15px;
  max-height: 500px;
}

.chat-box::-webkit-scrollbar {
  width: 8px;
}

.chat-box::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 10px;
}

.chat-box::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 10px;
}

.chat-box::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* ============================================================================
   MESSAGES
   ============================================================================ */
.messageRows {
  display: flex;
  margin: 15px 0;
  position: relative;
}

.messageRows.other {
  justify-content: flex-start;
}

.messageRows.self {
  justify-content: flex-end;
}

.messageBox {
  display: flex;
  max-width: 70%;
  gap: 10px;
  padding: 15px;
  border-radius: 10px;
  background: white;
}

.messageRows.other .messageBox {
  background: #ffffff;
  color: #000000;
  border-radius: 15px;
  padding: 30px 37px 30px 1px;
  box-shadow: 0 11px 44px rgba(222, 224, 242, 0.4);
}

.messageRows.self .messageBox {
  background: #fff;
  color: #333;
}

.profile {
  min-width: 35px;
  min-height: 35px;
  max-width: 35px;
  max-height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 20px;
  background-color: #e5e7e9;
}

.messageRows.other .profile {
  background-color: rgba(255, 255, 255, 0.3);
}

.text {
  flex: 1;
}

.label {
  font-size: 18px;
  text-align: center;
  font-weight: 400;
  margin-bottom: 5px;
  opacity: 0.8;
}

.message {
  font-size: 14px;
  line-height: 1.5;
  word-wrap: break-word;
  margin-bottom: 5px;
}

.timestamp {
  font-size: 10px;
  opacity: 0.6;
  margin-top: 5px;
}

.firstMsg {
  display: none;
}

/* Form messages */
.formBox {
  min-width: 90%;
  margin: 0 auto;
}

.formMessage h2 {
  font-size: 13px;
  font-weight: 300;
  margin-bottom: 15px;
  text-align: center;
  line-height: 1.2;
}

.formMessage label {
  display: block;
  font-size: 12px;
  margin-top: 12px;
  margin-bottom: 5px;
  font-weight: 500;
}

.formMessage input,
.formMessage textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
}

.formMessage textarea {
  min-height: 80px;
  resize: vertical;
}

.formMessage .inline-fields {
  display: flex;
  gap: 10px;
}

.formMessage .inline-field {
  flex: 1;
}

.formMessage button {
  width: 100%;
  margin-top: 15px;
  padding: 12px;
  border: none;
  border-radius: 6px;
  background: #ccc;
  color: #666;
  font-size: 14px;
  font-weight: 600;
  cursor: not-allowed;
  transition: 0.3s;
}

.formMessage button.hoverAdder {
  background: linear-gradient(269deg, rgb(70, 54, 235), rgb(221, 62, 214));
  color: white;
  cursor: pointer;
}

.formMessage button.hoverAdder:hover {
  transform: translateY(-2px);
}

/* ============================================================================
   INPUT CARD
   ============================================================================ */
.input-card {
  padding: 20px;
}

.input-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#userMessage {
  width: 100%;
  padding: 12px;
  background: #fefa8e;
  border: 2px solid rgb(212, 212, 213);
  border-radius: 18px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  min-height: 60px;
  transition: border-color 0.3s ease;
}

#userMessage:focus {
  outline: none;
  border-color: #667eea;
}

.mainIconsBox {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.icons {
  display: flex;
  gap: 15px;
  align-items: center;
}

.icons a {
  font-size: 24px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.icons a:hover {
  transform: scale(1.2);
}

.send-button {
  width: 40px;
  height: 40px;
  background: linear-gradient(269deg, rgb(70, 54, 235), rgb(221, 62, 214));
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 20px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.send-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.send-button:active {
  transform: translateY(0);
}

.send-button.btnAnimator {
  animation: pulse 0.5s ease;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* ============================================================================
   EMOJI PICKER
   ============================================================================ */
.emojis-box {
  margin-top: 10px;
  padding: 15px;
  background: #f9f9f9;
  border-radius: 8px;
  max-height: 150px;
  overflow-y: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.emojis-box.box-hider {
  display: none;
}

.emoji-letter {
  font-size: 24px;
  cursor: pointer;
  padding: 5px;
  border-radius: 5px;
  transition: background 0.2s ease;
}

.emoji-letter:hover {
  background: #e0e0e0;
}

/* ============================================================================
   INFO CARD
   ============================================================================ */
.info-card {
  background: #f9f9f9;
}

.info-card h3 {
  margin-bottom: 15px;
  color: #333;
  font-size: 18px;
  text-align: center;
}

.info-card p {
  margin-bottom: 8px;
  color: #666;
  font-size: 14px;
  line-height: 1.2;
  text-align: center;
}

/* ============================================================================
   LOADER
   ============================================================================ */
.loader {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #667eea;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ============================================================================
   FILE ICONS
   ============================================================================ */
.file-icon {
  width: 60px;
  height: 60px;
  margin: 0 auto;
}

.fileName {
  font-size: 12px;
  margin-top: 8px;
  word-break: break-all;
  text-align: center;
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */
@media (max-width: 768px) {
  body {
    padding: 10px;
  }
  
  .main-title {
    font-size: 24px;
  }
  
  .chat-box {
    max-height: 400px;
  }
  
  .messageBox {
    max-width: 85%;
  }
  
  .static-container {
    gap: 10px;
  }
  
  .child1 {
    min-width: 50px;
    min-height: 50px;
    font-size: 24px;
  }
}

@media (max-width: 480px) {
  .card {
    padding: 15px;
  }
  
  .formBox {
    width: 100%;
  }
}



/*-------------------Responsive design for search-----------------*/
@media (max-width: 480px) {
  .grid {
    padding: 15px;
  }
  .card {
    font-size: 14px;
    padding: 15px; 
    border-radius: 32px;
  }
  .card::before {
    top: -3px; left: -3px; right: -3px; bottom: -3px;
    border-radius: 30px;
  }
}

@media (max-width: 768px) {
  .grid {
    padding: 20px;
  }
  
  .card {
    font-size: 14px;
    padding: 15px;  
    border-radius: 32px;
  }
  .card::before {
    top: -3px; left: -3px; right: -3px; bottom: -3px;
    border-radius: 30px;
  }
}

@media (max-width: 768px) {

  .css-doughnut {
   width: 50px;
   height: 50px;
  }

  .doughnut-wrapper {
   width: 60px;
   padding: 9px;
  }

  .doughnut-label {
   font-size: 13px;
  }

  .css-doughnut-text {
   font-size: 16px;
  }

}


/* Responsive */
@media only screen and (max-width: 768px) {
  .calendar {
    max-width: 100%;
    gap: 5px;
  }
  
  .calendar-day {
    font-size: 12px;
  }
}

