/* Add these improvements to CSS */
@media (max-width: 768px) {
    .uttik-faq-section {
        padding: 15px;
    }
    
    .uttik-faq-item {
        padding: 12px 15px;
    }
    
    .uttik-support-form {
        width: 100%;
        max-width: 100%;
        margin: 0;
    }
}


/* FAQ Widget Styles */
.uttik-faq-section {
    width: 100%;
    padding: 60px 20px;
 
  }
  
  .uttik-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
  }
  
  .uttik-header {
    text-align: center;
    margin-bottom: 50px;
    animation: uttikFadeInDown 0.6s ease-out;
  }
  
  .uttik-subtitle {
    color: #4f46e5;
    font-weight: 600;
    font-size: 1rem;
    margin: 0;
  }
  
  .uttik-title {
    color: #111827;
    font-weight: 800;
    font-size: 2.5rem;
    line-height: 1.2;
    margin: 10px 0 8px 0;
  }
  
  .uttik-faq-count {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    font-weight: 500;
    font-size: 0.95rem;
  }
  
  .uttik-faq-count svg {
    width: 18px;
    height: 18px;
    margin-right: 6px;
  }
  
  .uttik-search-box {
    background: #ffffff;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 30px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    animation: uttikFadeIn 0.8s ease-out;
  }
  
  .uttik-search-box input {
    width: 100%;
    border: none;
    outline: none;
    font-size: 15px;
    color: #333;
    background: transparent;
  }
  
  .uttik-search-box input::placeholder {
    color: #9ca3af;
  }
  
  .uttik-faq-list {
    animation: uttikFadeInUp 0.8s ease-out;
  }
  
  .uttik-faq-item {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    margin-bottom: 16px;
    background: #ffffff;
    overflow: hidden;
    transition: all 0.3s ease;
  }
  
  .uttik-faq-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-color: #d1d5db;
  }
  
  .uttik-faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    cursor: pointer;
    user-select: none;
  }
  
  .uttik-faq-question h3 {
    flex: 1;
    margin: 0;
    margin-right: 20px;
    line-height: 1.5;
    font-size: 1.1rem;
    font-weight: 600;
    color: #1f2937;
  }
  
  .uttik-faq-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.3s ease;
  }
  
  .uttik-faq-item.active .uttik-faq-icon {
    background: #dbeafe;
    transform: rotate(180deg);
  }
  
  .uttik-faq-icon svg {
    width: 18px;
    height: 18px;
    fill: #6b7280;
    transition: all 0.3s ease;
  }
  
  .uttik-faq-item.active .uttik-faq-icon svg {
    fill: #4f46e5;
  }
  
  .uttik-faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.4s ease;
    padding: 0 24px;
  }
  
  .uttik-faq-answer.open {
    max-height: 500px;
    padding: 0 24px 24px 24px;
  }
  
  .uttik-faq-answer p {
    color: #4b5563;
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 16px;
  }
  
  .uttik-faq-answer a {
    color: #4f46e5;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    transition: all 0.2s ease;
    gap: 4px;
  }
  
  .uttik-faq-answer a:hover {
    color: #6366f1;
    gap: 8px;
  }
  
  #uttik-faq-empty,
  #uttik-faq-loading {
    text-align: center;
    padding: 80px 20px;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
  }
  
  #uttik-faq-empty svg,
  #uttik-faq-loading svg {
    width: 64px;
    height: 64px;
    margin-bottom: 20px;
    opacity: 0.3;
    fill: #9ca3af;
  }
  
  #uttik-faq-loading svg {
    animation: uttikSpin 1s linear infinite;
  }
  
  #uttik-faq-empty h3,
  #uttik-faq-loading h3 {
    font-size: 20px;
    color: #6b7280;
    margin-bottom: 10px;
    font-weight: 600;
  }
  
  #uttik-faq-empty p,
  #uttik-faq-loading p {
    color: #9ca3af;
    font-size: 15px;
  }
  
  .uttik-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 40px;
    animation: uttikFadeIn 1.2s ease-out;
  }
  
  .uttik-pagination button {
    padding: 10px 16px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    color: #6b7280;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
    min-width: 40px;
  }
  
  .uttik-pagination button:hover:not(:disabled) {
    background: #f9fafb;
    border-color: #4f46e5;
    color: #4f46e5;
  }
  
  .uttik-pagination button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
  }
  
  .uttik-pagination button.active {
    background: #4f46e5;
    color: #ffffff;
    border-color: #4f46e5;
  }
  
  .uttik-pagination-dots {
    padding: 10px 8px;
    color: #9ca3af;
    user-select: none;
  }
  
  /* Support CTA */
  .uttik-support-cta {
    text-align: center;
    margin-top: 40px;
  }
  
  .uttik-support-cta p {
    color: #4b5563;
    font-weight: 600;
    margin-bottom: 14px;
  }
  
  .uttik-support-btn {
    background: linear-gradient(90deg, #4f46e5, #6366f1);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    padding: 12px 22px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.25);
    transition: transform .05s ease, box-shadow .2s ease;
  }
  
  .uttik-support-btn:hover {
    box-shadow: 0 6px 14px rgba(99, 102, 241, 0.35);
  }
  
  .uttik-support-btn:active {
    transform: translateY(1px);
  }
  
  /* Modal Styles */
  .uttik-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 9999;
    animation: uttikFadeIn 0.3s ease;
  }
  
  .uttik-modal-overlay.active {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  
  .uttik-modal {
    background: white;
    border-radius: 20px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: uttikSlideUp 0.3s ease;
    display: flex;
    flex-direction: column;
  }
  
  .uttik-modal-header {
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    color: white;
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  
  .uttik-modal-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0;
  }
  
  .uttik-close-button {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: background 0.2s ease;
    line-height: 1;
  }
  
  .uttik-close-button:hover {
    background: rgba(255, 255, 255, 0.3);
  }
  
  .uttik-modal-content {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
  }
  
  #uttik-modal-search {
    margin-bottom: 20px;
  }
  
  #uttik-modal-search input {
    width: 100%;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 14px;
    font-size: 15px;
    outline: none;
  }
  
  #uttik-modal-faq-empty,
  #uttik-modal-loading {
    text-align: center;
    padding: 40px;
    color: #6b7280;
  }
  
  .uttik-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #4f46e5;
    border-radius: 50%;
    animation: uttikSpin 1s linear infinite;
    margin: 0 auto 16px;
  }
  
  /* Support Form */
  #uttik-support-form {
    padding: 10px 0;
  }
  
  #uttik-support-form h3 {
    margin-bottom: 20px;
    color: #111827;
    font-size: 20px;
    font-weight: 700;
  }
  
  .uttik-form-group {
    margin-bottom: 16px;
  }
  
  .uttik-form-group label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
  }
  
  .uttik-form-group input,
  .uttik-form-group textarea {
    width: 100%;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px;
    font-size: 15px;
    color: #111827;
  }
  
  .uttik-form-group textarea {
    resize: vertical;
    min-height: 120px;
  }
  
  .uttik-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 20px;
  }
  
  .uttik-btn-secondary {
    background: #f3f4f6;
    color: #4b5563;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px 16px;
    font-weight: 500;
    cursor: pointer;
    font-size: 15px;
  }
  
  .uttik-btn-primary {
    background: linear-gradient(90deg, #4f46e5, #6366f1);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 10px 16px;
    font-weight: 600;
    cursor: pointer;
    font-size: 15px;
  }
  
  /* Sticky Button */
  .uttik-sticky-button {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 260px;
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 100%);
    color: white;
    border: none;
    border-radius: 16px;
    padding: 16px 20px;
    cursor: pointer;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s ease;
    z-index: 9998;
  }
  
  .uttik-sticky-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(99, 102, 241, 0.5);
  }
  
  .uttik-sticky-button:active {
    transform: translateY(0);
  }
  
  .uttik-icon {
    width: 28px;
    height: 28px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
  }
  
  .uttik-faq-open-button {
    display: inline-block;
    background: linear-gradient(90deg, #4f46e5, #6366f1);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    font-weight: 600;
    cursor: pointer;
    font-size: 16px;
  }
  
  /* Animations */
  @keyframes uttikFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
  }
  
  @keyframes uttikFadeInDown {
    from { opacity: 0; transform: translateY(-20px);}
    to { opacity:1; transform: translateY(0);}
  }
  
  @keyframes uttikFadeInUp {
    from { opacity:0; transform: translateY(20px);}
    to { opacity:1; transform: translateY(0);}
  }
  
  @keyframes uttikSlideUp {
    from {
      opacity: 0;
      transform: translateY(40px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }
  
  @keyframes uttikSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
  }
  
  /* Responsive Styles */
  @media (max-width: 768px) {
    .uttik-faq-section {
      padding: 40px 16px;
    }
    
    .uttik-title {
      font-size: 2rem;
    }
    
    .uttik-search-box {
      padding: 12px 16px;
    }
    
    .uttik-faq-question {
      padding: 20px 16px;
    }
    
    .uttik-faq-question h3 {
      font-size: 1rem;
    }
    
    .uttik-faq-answer.open {
      padding: 0 16px 20px 16px;
    }
    
    .uttik-faq-icon {
      width: 28px;
      height: 28px;
    }
    
    .uttik-faq-icon svg {
      width: 16px;
      height: 16px;
    }
    
    .uttik-pagination {
      gap: 6px;
    }
    
    .uttik-pagination button {
      padding: 8px 12px;
      font-size: 13px;
      min-width: 36px;
    }
    
    .uttik-sticky-button {
      width: auto;
      padding: 14px 18px;
      font-size: 14px;
    }
  }
  
  /* ===== UTTIK Modal Base Styles ===== */
#uttik-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  font-family: inherit;
  color: inherit;
}

/* Make sure modal inherits WP typography */
#uttik-modal-overlay * {
  font-family: inherit !important;
  color: inherit;
  box-sizing: border-box;
}

/* ===== Modal Window ===== */
#uttik-modal-overlay.active {
  display: flex;
}

.uttik-modal {
  background: #fff;
  border-radius: 8px;
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 1.5rem;
  box-shadow: 0 4px 20px rgba(0,0,0,0.25);
  position: relative;
  animation: fadeInScale 0.25s ease;
}

/* ===== Modal Header ===== */
.uttik-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  border-bottom: 1px solid rgba(0,0,0,0.1);
  padding-bottom: 0.5rem;
}

.uttik-modal-title {
  font-size: 1.3rem;
  font-weight: 600;
}

.uttik-close-button {
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  color: inherit;
}

/* ===== Modal Content ===== */
.uttik-modal-content input,
.uttik-modal-content textarea {
  width: 100%;
  padding: 0.6rem;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: inherit;
}

.uttik-form-group {
  margin-bottom: 1rem;
}

.uttik-btn-primary,
.uttik-btn-secondary {
  font-size: 0.9rem;
  border-radius: 4px;
  padding: 0.6rem 1.2rem;
  cursor: pointer;
}

.uttik-btn-primary {
  background: var(--wp--preset--color--primary, #0073aa);
  color: #fff;
  border: none;
}

.uttik-btn-secondary {
  background: transparent;
  color: inherit;
  border: 1px solid currentColor;
}

/* ===== Animation ===== */
@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
