/**
 * @file
 * feedback.css
 *
 * Attractive Government Portal Feedback Form — NCLT (Drupal 11)
 *
 * Features:
 *  - Gradient page background
 *  - Glassmorphism-style card with depth shadow
 *  - Gradient card header banner
 *  - Animated input focus (glowing border + lift)
 *  - Gradient submit button with shimmer hover
 *  - Smooth transitions on all interactive elements
 *  - Hover effects on form items
 *  - Fully responsive
 *
 * Scoped to .fb-wrap — zero bleed to other pages.
 * All fields are 100% dynamic via Drupal's {{ children }}.
 */

/* ============================================================
   1. PAGE BACKGROUND — gradient
   ============================================================ */
.fb-wrap {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 0 48px;
  font-family: 'open_sansregular', Arial, sans-serif;
}

/* ============================================================
   2. PAGE TITLE — gradient text + animated underline
   ============================================================ */
.fb-page-title {
  text-align: center;
  margin-bottom: 28px;
}

.fb-page-title__text {
  font-size: 1.75rem;
  font-weight: 700;
  font-family: 'open_sansbold', Arial, sans-serif;
  letter-spacing: 0.02em;
  margin: 0 0 8px;

  /* Gradient text */
  background: linear-gradient(135deg, #052860 0%, #1a6bb5 50%, #a75e57 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.fb-page-title__bar {
  display: block;
  width: 0;
  height: 3px;
  background: linear-gradient(90deg, #052860, #a75e57);
  margin: 0 auto;
  border-radius: 2px;
  animation: fb-bar-grow 0.8s ease forwards 0.2s;
}

@keyframes fb-bar-grow {
  to { width: 80px; }
}

/* ============================================================
   3. INFO NOTICE BOX — gradient left border
   ============================================================ */
.fb-notice {
  background: linear-gradient(135deg, #fff8f8 0%, #fff5f0 100%);
  border: 1px solid #f0d0c8;
  border-left: 4px solid #a75e57;
  border-radius: 6px;
  padding: 16px 20px;
  margin-bottom: 24px;
  font-size: 0.84rem;
  color: #4a3030;
  line-height: 1.7;
  box-shadow: 0 2px 8px rgba(167, 94, 87, 0.08);
}

.fb-notice p {
  margin: 0 0 8px;
}

.fb-notice p:last-child {
  margin-bottom: 0;
}

/* ============================================================
   4. FORM CARD — gradient header + deep shadow
   ============================================================ */
.fb-card {
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow:
    0 8px 32px rgba(5, 40, 96, 0.12),
    0 2px 8px rgba(5, 40, 96, 0.06),
    0 0 0 1px rgba(5, 40, 96, 0.06);
  transition: box-shadow 0.3s ease;
}

.fb-card:hover {
  box-shadow:
    0 12px 40px rgba(5, 40, 96, 0.16),
    0 4px 12px rgba(5, 40, 96, 0.08),
    0 0 0 1px rgba(5, 40, 96, 0.08);
}

/* ── Card gradient header banner ── */
.fb-card::before {
  content: '';
  display: block;
  height: 6px;
  background: linear-gradient(90deg,
    #052860 0%,
    #1a6bb5 35%,
    #a75e57 65%,
    #feb80f 100%
  );
  background-size: 200% 100%;
  animation: fb-header-slide 4s ease infinite alternate;
}

@keyframes fb-header-slide {
  0%   { background-position: 0% 50%; }
  100% { background-position: 100% 50%; }
}

/* Card inner padding */
.fb-card-inner {
  padding: 28px 32px 32px;
}

/* Required note */
.fb-required-note {
  font-size: 0.82rem;
  color: #666;
  margin: 0 0 22px;
  padding-bottom: 14px;
  border-bottom: 1px dashed #e8e8e8;
}

.fb-req-star {
  color: #c0392b;
  font-weight: 700;
}

/* ============================================================
   5. FORM ITEMS — hover lift effect
   ============================================================ */
.fb-wrap .form-item,
.fb-wrap .js-form-item {
  margin-bottom: 20px;
  position: relative;
  transition: transform 0.15s ease;
}

.fb-wrap .form-item:hover,
.fb-wrap .js-form-item:hover {
  transform: translateY(-1px);
}

/* ============================================================
   6. LABELS — styled with left accent on focus-within
   ============================================================ */
.fb-wrap label,
.fb-wrap .form-item__label {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  color: #2a3a5a;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 7px;
  font-family: 'open_sanssemibold', Arial, sans-serif;
  transition: color 0.2s;
}

.fb-wrap .form-item:focus-within label,
.fb-wrap .js-form-item:focus-within label {
  color: #052860;
}

/* Required asterisk */
.fb-wrap .form-required,
.fb-wrap label .form-required {
  color: #c0392b;
  margin-left: 2px;
}

/* ============================================================
   7. INPUTS — gradient border on focus, glow effect
   ============================================================ */
.fb-wrap input[type="text"],
.fb-wrap input[type="email"],
.fb-wrap input[type="tel"],
.fb-wrap input[type="number"],
.fb-wrap .form-text,
.fb-wrap .form-email {
  display: block;
  width: 100%;
  height: 46px;
  padding: 0 16px;
  border: 1.5px solid #d0dce8;
  border-radius: 8px;
  background: #f8fafd;
  font-size: 0.9rem;
  color: #1a2e45;
  font-family: 'open_sansregular', Arial, sans-serif;
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    background 0.25s ease,
    transform 0.15s ease;
  -webkit-appearance: none;
  appearance: none;
  box-shadow: none;
}

/* Hover */
.fb-wrap input[type="text"]:hover,
.fb-wrap input[type="email"]:hover,
.fb-wrap input[type="tel"]:hover {
  border-color: #a0b8d8;
  background: #f0f5fc;
}

/* Focus — glowing blue border */
.fb-wrap input[type="text"]:focus,
.fb-wrap input[type="email"]:focus,
.fb-wrap input[type="tel"]:focus {
  outline: none;
  border-color: #1a6bb5;
  background: #ffffff;
  box-shadow:
    0 0 0 3px rgba(26, 107, 181, 0.15),
    0 2px 8px rgba(26, 107, 181, 0.10);
  transform: translateY(-1px);
}

/* ============================================================
   8. TEXTAREAS
   ============================================================ */
.fb-wrap textarea,
.fb-wrap .form-textarea {
  display: block;
  width: 100%;
  min-height: 110px;
  padding: 12px 16px;
  border: 1.5px solid #d0dce8;
  border-radius: 8px;
  background: #f8fafd;
  font-size: 0.9rem;
  color: #1a2e45;
  font-family: 'open_sansregular', Arial, sans-serif;
  line-height: 1.65;
  resize: vertical;
  transition:
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    background 0.25s ease,
    transform 0.15s ease;
  -webkit-appearance: none;
  appearance: none;
  box-shadow: none;
}

.fb-wrap textarea:hover {
  border-color: #a0b8d8;
  background: #f0f5fc;
}

.fb-wrap textarea:focus {
  outline: none;
  border-color: #1a6bb5;
  background: #ffffff;
  box-shadow:
    0 0 0 3px rgba(26, 107, 181, 0.15),
    0 2px 8px rgba(26, 107, 181, 0.10);
  transform: translateY(-1px);
}

/* Comments/Feedback — taller */
.fb-wrap .form-item--comments-feedback textarea,
.fb-wrap #edit-comments-feedback {
  min-height: 140px;
}

/* Placeholder */
.fb-wrap input::placeholder,
.fb-wrap textarea::placeholder {
  color: #9ab0c8;
  font-size: 0.85rem;
}

/* ============================================================
   9. DESCRIPTION / HELP TEXT
   ============================================================ */
.fb-wrap .form-item__description,
.fb-wrap .description {
  font-size: 0.74rem;
  color: #7a90a8;
  margin-top: 5px;
  line-height: 1.5;
}

/* ============================================================
   10. ERROR STATES
   ============================================================ */
.fb-wrap .form-item--error input,
.fb-wrap .form-item--error textarea,
.fb-wrap input.error,
.fb-wrap textarea.error {
  border-color: #e74c3c;
  background: #fff8f8;
  box-shadow: 0 0 0 3px rgba(231, 76, 60, 0.10);
}

.fb-wrap .form-item__error-message,
.fb-wrap .form-item .error {
  font-size: 0.76rem;
  color: #e74c3c;
  margin-top: 5px;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ============================================================
   11. CAPTCHA — styled box with gradient top border
   ============================================================ */
.fb-wrap .captcha,
.fb-wrap .form-item--captcha {
  background: linear-gradient(135deg, #f4f8fd 0%, #eef3fb 100%);
  border: 1.5px solid #c8ddf0;
  border-top: 3px solid #1a6bb5;
  border-radius: 8px;
  padding: 18px 20px;
  margin-bottom: 20px;
  transition: border-color 0.25s, box-shadow 0.25s;
}

.fb-wrap .captcha:hover,
.fb-wrap .form-item--captcha:hover {
  border-color: #a0c0e0;
  box-shadow: 0 4px 16px rgba(26, 107, 181, 0.10);
}

/* Captcha label */
.fb-wrap .captcha > label,
.fb-wrap .captcha .captcha__title {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: #2a3a5a;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 10px;
  font-family: 'open_sanssemibold', Arial, sans-serif;
}

/* Captcha description */
.fb-wrap .captcha .captcha__description,
.fb-wrap .captcha .description {
  font-size: 0.74rem;
  color: #6a8aaa;
  margin-bottom: 10px;
  line-height: 1.5;
}

/* Captcha image */
.fb-wrap .captcha img {
  display: inline-block;
  border: 1.5px solid #b8cce4;
  border-radius: 6px;
  background: #fff;
  padding: 6px 14px;
  vertical-align: middle;
  box-shadow: 0 2px 6px rgba(5, 40, 96, 0.08);
}

/* Refresh / audio links */
.fb-wrap .captcha a {
  color: #1a6bb5;
  /* font-size: 1.05rem; */
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid transparent;
  transition: color 0.2s, background 0.2s, border-color 0.2s, transform 0.15s;
}

.fb-wrap .captcha a:hover {
  color: #052860;
  background: #dce8f5;
  border-color: #b8cce4;
  transform: rotate(15deg) scale(1.1);
}

/* Captcha text input */
.fb-wrap .captcha .form-item {
  margin-bottom: 0;
  margin-top: 10px;
}

.fb-wrap .captcha input[type="text"],
.fb-wrap .captcha .form-text {
  height: 46px;
  background: #fff;
  border-color: #b8cce4;
}

.fb-wrap .captcha input[type="text"]:focus {
  border-color: #1a6bb5;
  box-shadow: 0 0 0 3px rgba(26, 107, 181, 0.15);
}

/* ============================================================
   12. SUBMIT BUTTON — gradient with shimmer hover
   ============================================================ */
.fb-wrap .form-actions,
.fb-wrap .webform-actions {
  display: flex;
  justify-content: center;
  margin-top: 28px;
  margin-bottom: 0;
}

.fb-wrap .form-actions input[type="submit"],
.fb-wrap .form-actions button[type="submit"],
.fb-wrap .webform-actions input[type="submit"],
.fb-wrap input#edit-submit {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 52px;
  overflow: hidden;

  /* Gradient background */
  background: linear-gradient(135deg, #052860 0%, #1a6bb5 50%, #0f4c81 100%);
  background-size: 200% 200%;

  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  font-family: 'open_sansbold', Arial, sans-serif;

  box-shadow:
    0 4px 15px rgba(5, 40, 96, 0.35),
    0 1px 4px rgba(5, 40, 96, 0.20);

  transition:
    background-position 0.4s ease,
    box-shadow 0.3s ease,
    transform 0.2s ease;

  -webkit-appearance: none;
  appearance: none;
  height: auto;
  width: auto;
}

/* Shimmer pseudo-element */
.fb-wrap .form-actions input[type="submit"]::before,
.fb-wrap input#edit-submit::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent 0%,
    rgba(255, 255, 255, 0.25) 50%,
    transparent 100%
  );
  transition: left 0.5s ease;
}

/* Hover — shift gradient + shimmer sweep */
.fb-wrap .form-actions input[type="submit"]:hover,
.fb-wrap input#edit-submit:hover {
  background-position: 100% 100%;
  box-shadow:
    0 8px 24px rgba(5, 40, 96, 0.45),
    0 2px 8px rgba(5, 40, 96, 0.25);
  transform: translateY(-2px);
}

.fb-wrap .form-actions input[type="submit"]:hover::before,
.fb-wrap input#edit-submit:hover::before {
  left: 150%;
}

/* Active — press down */
.fb-wrap .form-actions input[type="submit"]:active,
.fb-wrap input#edit-submit:active {
  transform: translateY(0);
  box-shadow:
    0 2px 8px rgba(5, 40, 96, 0.30),
    0 1px 3px rgba(5, 40, 96, 0.15);
}

/* Focus ring */
.fb-wrap .form-actions input[type="submit"]:focus,
.fb-wrap input#edit-submit:focus {
  outline: 3px solid #feb80f;
  outline-offset: 3px;
}

/* ============================================================
   13. DRUPAL STATUS MESSAGES
   ============================================================ */
.fb-wrap .messages {
  margin-bottom: 20px;
  border-radius: 6px;
  font-size: 0.88rem;
}

/* ============================================================
   14. SECTION DIVIDER between groups of fields
   ============================================================ */
.fb-wrap .form-item--subject,
.fb-wrap .form-item--address {
  position: relative;
}

/* ============================================================
   15. RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .fb-card-inner {
    padding: 20px 18px 24px;
  }

  .fb-page-title__text {
    font-size: 1.4rem;
  }
}

@media (max-width: 480px) {
  .fb-card-inner {
    padding: 16px 14px 20px;
  }

  .fb-wrap .form-actions input[type="submit"],
  .fb-wrap input#edit-submit {
    width: 100%;
    padding: 13px 20px;
  }

  .fb-page-title__text {
    font-size: 1.2rem;
  }
}

/* ============================================================
   16. ACCESSIBILITY
   ============================================================ */
.fb-wrap input:focus-visible,
.fb-wrap textarea:focus-visible,
.fb-wrap button:focus-visible,
.fb-wrap a:focus-visible {
  outline: 3px solid #feb80f;
  outline-offset: 2px;
}

@media (forced-colors: active) {
  .fb-wrap .form-actions input[type="submit"] {
    border: 2px solid ButtonText;
    background: ButtonFace;
    color: ButtonText;
  }
}

/* ============================================================
   17. OVERRIDE old style.css yellow submit button
   ============================================================ */
.fb-wrap input#edit-submit {
  background: linear-gradient(135deg, #052860 0%, #1a6bb5 50%, #0f4c81 100%) !important;
  background-size: 200% 200% !important;
  color: #fff !important;
  border: none !important;
  border-radius: 8px !important;
  padding: 13px 52px !important;
}

.fb-wrap input#edit-submit:hover {
  background-position: 100% 100% !important;
  color: #fff !important;
}

#webform-submission-feedback-add-form .form-textarea {
  min-height: 110px;
}

/* ============================================================
   18. FEEDBACK CONFIRMATION PAGE
   ============================================================ */
.fb-confirmation-wrap {
  max-width: 720px;
  padding-bottom: 56px;
}

.fb-confirmation-card {
  text-align: center;
}

.fb-confirmation-inner {
  padding: 40px 36px 36px;
}

.fb-confirmation__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 88px;
  height: 88px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: linear-gradient(135deg, #e8f4ea 0%, #d4edda 100%);
  color: #1e7e34;
  font-size: 2.75rem;
  box-shadow:
    0 8px 24px rgba(30, 126, 52, 0.15),
    inset 0 0 0 1px rgba(30, 126, 52, 0.08);
  animation: fb-confirmation-pop 0.5s ease;
}

@keyframes fb-confirmation-pop {
  0% {
    opacity: 0;
    transform: scale(0.6);
  }
  70% {
    transform: scale(1.08);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.fb-confirmation__title {
  margin: 0 0 16px;
  font-size: 1.5rem;
  font-weight: 700;
  font-family: 'open_sansbold', Arial, sans-serif;
  color: #052860;
  letter-spacing: 0.01em;
}

.fb-confirmation__message {
  max-width: 520px;
  margin: 0 auto 28px;
  font-size: 0.95rem;
  line-height: 1.75;
  color: #3a4a5f;
}

.fb-confirmation__message p {
  margin: 0;
}

.fb-confirmation__message strong {
  display: block;
  margin-bottom: 8px;
  font-size: 1.05rem;
  font-family: 'open_sanssemibold', Arial, sans-serif;
  color: #1e7e34;
}

.fb-confirmation__actions {
  display: flex;
  justify-content: center;
  margin-top: 8px;
}

.fb-confirmation__back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 36px;
  border-radius: 8px;
  background: linear-gradient(135deg, #052860 0%, #1a6bb5 50%, #0f4c81 100%);
  background-size: 200% 200%;
  color: #fff !important;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none !important;
  font-family: 'open_sansbold', Arial, sans-serif;
  box-shadow:
    0 4px 15px rgba(5, 40, 96, 0.35),
    0 1px 4px rgba(5, 40, 96, 0.20);
  transition:
    background-position 0.4s ease,
    box-shadow 0.3s ease,
    transform 0.2s ease;
}

.fb-confirmation__back-btn:hover,
.fb-confirmation__back-btn:focus {
  background-position: 100% 100%;
  color: #fff !important;
  text-decoration: none !important;
  box-shadow:
    0 8px 24px rgba(5, 40, 96, 0.45),
    0 2px 8px rgba(5, 40, 96, 0.25);
  transform: translateY(-2px);
}

.fb-confirmation__back-btn:focus-visible {
  outline: 3px solid #feb80f;
  outline-offset: 3px;
}

@media (max-width: 768px) {
  .fb-confirmation-inner {
    padding: 32px 22px 28px;
  }

  .fb-confirmation__icon {
    width: 72px;
    height: 72px;
    font-size: 2.2rem;
  }

  .fb-confirmation__title {
    font-size: 1.25rem;
  }
}

@media (max-width: 480px) {
  .fb-confirmation__back-btn {
    width: 100%;
    padding: 13px 20px;
  }
}
