/**
 * Auth Forms & Member Dashboard - Frontend Styles
 *
 * Bricks theme variables used:
 * --primary (navy), --secondary (red), --text, --dark,
 * --light-bg, --black, --white, --orange, --blue
 *
 * Theme base font-size: 10px
 */

/* =========================================================================
   Form Container
   ========================================================================= */
.fs-auth-form {
  max-width: 520px;
  margin: 4rem auto;
  padding: 4rem 3.5rem;
  background: var(--white, #fff);
  border-radius: 8px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
}

.fs-auth-form form {
  display: flex;
  flex-direction: column;
  gap: 2.2rem;
}

.fs-profile-form {
  max-width: 760px;
}

/* =========================================================================
   Messages
   ========================================================================= */
.fs-auth-message {
  padding: 1.4rem 1.8rem;
  border-radius: 6px;
  margin-bottom: 2.4rem;
  font-size: 1.5rem;
  line-height: 1.5;
  font-weight: 500;
}

.fs-auth-error {
  background: #fef2f2;
  color: #b91c1c;
  border-left: 4px solid var(--secondary, #c0392b);
}

.fs-auth-success {
  background: #ecfdf5;
  color: #065f46;
  border-left: 4px solid #059669;
}

.fs-auth-notice {
  max-width: 520px;
  margin: 4rem auto;
  padding: 3rem;
  text-align: center;
  font-size: 1.7rem;
  color: var(--text);
}

.fs-auth-notice a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 700;
}

.fs-auth-notice a:hover {
  color: var(--secondary);
}

/* Force remove underlines inherited from theme global styles */
.fs-auth-form a,
.fs-auth-form a:hover,
.fs-auth-form a:focus,
.fs-auth-notice a,
.fs-auth-notice a:hover,
.fs-auth-notice a:focus,
.fs-dashboard a,
.fs-dashboard a:hover,
.fs-dashboard a:focus {
  text-decoration: none !important;
}

/* =========================================================================
   Form Fields
   ========================================================================= */
.fs-form-field label {
  display: block;
  margin-bottom: 0.8rem;
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--dark);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.fs-form-field input[type="text"],
.fs-form-field input[type="email"],
.fs-form-field input[type="password"],
.fs-form-field input[type="url"] {
  width: 100%;
  padding: 1.3rem 1.4rem;
  border: 2px solid #d1d5db;
  border-radius: 6px;
  font-size: 1.6rem;
  font-family: inherit;
  color: var(--text);
  background: var(--white, #fff);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.fs-form-field input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px hsla(215, 100%, 20%, 0.12);
}

.fs-field-hint {
  display: block;
  margin-top: 0.5rem;
  font-size: 1.3rem;
  color: var(--dark);
  opacity: 0.65;
}

/* Two-column row */
.fs-form-row {
  display: flex;
  gap: 1.8rem;
}

.fs-form-half {
  flex: 1;
}

/* Fieldset */
.fs-form-fieldset {
  border: 2px solid #e5e7eb;
  border-radius: 6px;
  padding: 2.2rem;
  margin: 0.5rem 0 0;
}

.fs-form-fieldset legend {
  font-weight: 700;
  font-size: 1.5rem;
  padding: 0 1rem;
  color: var(--dark);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.fs-form-fieldset .fs-field-hint {
  margin-bottom: 1.8rem;
}

.fs-form-fieldset .fs-form-field + .fs-form-field {
  margin-top: 1.8rem;
}


/* =========================================================================
   Buttons
   ========================================================================= */
.fs-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1.3rem 3rem;
  border: none;
  border-radius: 6px;
  font-size: 1.5rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
  line-height: 1.4;
}

.fs-btn:active {
  transform: translateY(1px);
}

.fs-btn-primary {
  background: var(--primary) !important;
  color: #fff !important;
}

.fs-btn-primary:hover {
  background: var(--dark) !important;
  color: #fff !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.fs-btn-primary .dashicons {
  color: #fff !important;
}

.fs-btn-secondary {
  background: var(--light-bg);
  color: var(--text);
  border: 2px solid #d1d5db;
}

.fs-btn-secondary:hover {
  background: #d1d5db;
}

.fs-btn-outline {
  background: transparent;
  color: var(--primary) !important;
  border: 2px solid var(--primary);
}

.fs-btn-outline:hover {
  background: var(--primary) !important;
  color: #fff !important;
}

.fs-btn-sm {
  padding: 0.8rem 1.6rem;
  font-size: 1.3rem;
}

.fs-form-actions {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  padding-top: 0.6rem;
}

/* Full-width button on login/register forms */
.fs-login-form .fs-btn-primary,
.fs-register-form .fs-btn-primary,
.fs-lost-password-form .fs-btn-primary {
  width: 100%;
}

/* =========================================================================
   Links
   ========================================================================= */
.fs-form-links {
  text-align: center;
  font-size: 1.4rem;
  color: var(--dark);
  padding-top: 0.6rem;
}

.fs-form-links a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.fs-form-links a:hover {
  color: var(--secondary);
}

.fs-separator {
  margin: 0 1rem;
  color: #d1d5db;
}

/* Description text */
.fs-form-description {
  color: var(--dark);
  font-size: 1.6rem;
  margin-bottom: 1rem;
  line-height: 1.6;
}

/* Honeypot */
.fs-hp {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  overflow: hidden;
}


/* =========================================================================
   Member Dashboard
   ========================================================================= */
.fs-dashboard {
  max-width: 1200px;
  width: 100%;
  margin: 4rem auto;
  font-family: inherit;
  color: var(--text);
  line-height: 1.6;
}

/* Welcome header */
.fs-dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2.4rem 3rem;
  background: var(--primary);
  color: var(--white, #fff);
  border-radius: 8px 8px 0 0;
}

.fs-dashboard-header h2 {
  margin: 0;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--white, #fff);
  line-height: 1.3;
}

.fs-dashboard-header p {
  margin: 0.4rem 0 0;
  font-size: 1.4rem;
  opacity: 0.8;
}

.fs-dashboard-header .fs-btn {
  flex-shrink: 0;
}

.fs-dashboard-header .fs-btn-secondary {
  background: rgba(255, 255, 255, 0.15);
  color: var(--white, #fff);
  border-color: rgba(255, 255, 255, 0.3);
}

.fs-dashboard-header .fs-btn-secondary:hover {
  background: rgba(255, 255, 255, 0.25);
}

.fs-dashboard-actions {
  display: flex;
  gap: 0.8rem;
  flex-shrink: 0;
}

/* Tab navigation */
.fs-dashboard-nav {
  display: flex;
  background: var(--white, #fff);
  border-left: 1px solid #d1d5db;
  border-right: 1px solid #d1d5db;
  border-bottom: 2px solid #d1d5db;
  overflow-x: auto;
}

.fs-dashboard-nav a {
  padding: 1.4rem 2.2rem;
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--dark);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.fs-dashboard-nav a:hover {
  color: var(--primary);
}

.fs-dashboard-nav a.active {
  color: var(--primary);
  border-bottom-color: var(--secondary);
}

/* Dashboard body */
.fs-dashboard-body {
  background: var(--white, #fff);
  border: 1px solid #d1d5db;
  border-top: none;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
}

/* Panels */
.fs-dashboard-panel {
  display: none;
  padding: 3rem;
}

.fs-dashboard-panel.active {
  display: block;
}

/* Quick links grid */
.fs-quick-links {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.4rem;
  margin-top: 1.6rem;
}

.fs-quick-link {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 1.6rem;
  background: var(--light-bg, #f5f5f5);
  border: 2px solid transparent;
  border-radius: 6px;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.fs-quick-link:hover {
  border-color: var(--primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  color: var(--primary);
}

.fs-quick-link .dashicons {
  font-size: 2.2rem;
  width: 2.2rem;
  height: 2.2rem;
  color: var(--primary);
}

.fs-quick-link span:last-child {
  font-weight: 600;
  font-size: 1.4rem;
}

/* Resource list */
.fs-resource-list {
  list-style: none;
  margin: 1.6rem 0 0;
  padding: 0;
}

.fs-resource-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.4rem 0;
  border-bottom: 1px solid #e5e7eb;
}

.fs-resource-item:last-child {
  border-bottom: none;
}

.fs-resource-item a {
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.5rem;
}

.fs-resource-item a:hover {
  color: var(--primary);
}

.fs-resource-meta {
  display: flex;
  gap: 1rem;
  align-items: center;
  font-size: 1.3rem;
  color: var(--dark);
  opacity: 0.65;
}

.fs-resource-badge {
  display: inline-block;
  padding: 0.3rem 0.8rem;
  background: var(--light-bg, #f5f5f5);
  border-radius: 4px;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--dark);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Section headings inside panels */
.fs-dashboard-section h3 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--dark);
  margin: 0 0 0.4rem;
}

.fs-dashboard-section p {
  font-size: 1.4rem;
  color: var(--dark);
  opacity: 0.65;
  margin: 0 0 1rem;
}

.fs-dashboard-section + .fs-dashboard-section {
  margin-top: 3rem;
  padding-top: 3rem;
  border-top: 1px solid #e5e7eb;
}

/* Empty state */
.fs-empty-state {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--dark);
  font-size: 1.5rem;
  opacity: 0.6;
}

/* Profile form inside dashboard — reset container styles */
.fs-dashboard-panel .fs-auth-form {
  max-width: none;
  margin: 0;
  padding: 0;
  background: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

/* Dashboard messages positioning */
.fs-dashboard-body > .fs-auth-message {
  margin: 2.4rem 3rem 0;
}

/* =========================================================================
   Responsive
   ========================================================================= */
@media (max-width: 600px) {
  .fs-auth-form {
    margin: 2rem 1.5rem;
    padding: 2.5rem 2rem;
  }

  .fs-form-row {
    flex-direction: column;
    gap: 2rem;
  }

  .fs-dashboard {
    margin: 2rem 1.5rem;
  }

  .fs-dashboard-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.4rem;
    padding: 2rem;
  }

  .fs-dashboard-nav a {
    padding: 1.2rem 1.6rem;
    font-size: 1.3rem;
  }

  .fs-dashboard-panel {
    padding: 2rem;
  }

  .fs-quick-links {
    grid-template-columns: 1fr;
  }

  .fs-resource-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.6rem;
  }
}

/* =========================================================================
   Inline Resource & Category Views
   ========================================================================= */

/* Back button bar */
.fs-inline-back {
  margin-bottom: 2rem;
}

.fs-inline-back .fs-btn {
  gap: 0.4rem;
}

.fs-inline-back .dashicons {
  font-size: 1.6rem;
  width: 1.6rem;
  height: 1.6rem;
  line-height: 1;
}

/* Resource detail card */
.fs-resource-detail {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
}

/* Header: subtle grey bar with blue text */
.fs-rd-header {
  display: flex;
  align-items: center;
  gap: 1.8rem;
  padding: 2.4rem 3rem;
  background: var(--light-bg, #f0f0f0);
  border-bottom: 1px solid #e5e7eb;
}

.fs-rd-header-text {
  flex: 1;
  min-width: 0;
}

.fs-rd-header-text h3 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary) !important;
  margin: 0 0 0.3rem;
  line-height: 1.3;
}

.fs-rd-meta-line {
  font-size: 1.3rem;
  color: var(--dark) !important;
  opacity: 0.6;
}

/* Body area */
.fs-rd-body {
  padding: 2.4rem 3rem 3rem;
  background: var(--white, #fff);
}

/* Badges row */
.fs-rd-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 2rem;
}

.fs-rd-badges .fs-resource-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.2rem;
  font-size: 1.2rem;
  background: var(--light-bg, #f5f5f5);
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  color: var(--dark) !important;
}

.fs-rd-badges .fs-resource-badge .dashicons {
  font-size: 1.3rem;
  width: 1.3rem;
  height: 1.3rem;
  opacity: 0.5;
}

/* Description */
.fs-rd-description {
  font-size: 1.5rem;
  line-height: 1.75;
  color: var(--text);
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #e5e7eb;
}

/* Download bar */
.fs-rd-download-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.6rem;
  padding: 1.8rem 2rem;
  background: var(--light-bg, #f5f5f5);
  border-radius: 8px;
  border: 1px solid #e5e7eb;
}

.fs-rd-file-info {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
}

.fs-rd-file-info > .dashicons {
  flex-shrink: 0;
  font-size: 2.4rem;
  width: 2.4rem;
  height: 2.4rem;
  color: var(--secondary, #c0392b);
}

.fs-rd-file-name {
  font-size: 1.35rem;
  color: var(--dark);
  opacity: 0.7;
  word-break: break-all;
  line-height: 1.4;
}

.fs-rd-download-bar .fs-btn {
  flex-shrink: 0;
  gap: 0.5rem;
}

.fs-rd-download-bar .fs-btn .dashicons {
  font-size: 1.5rem;
  width: 1.5rem;
  height: 1.5rem;
  color: #fff !important;
}

@media (max-width: 600px) {
  .fs-rd-header {
    padding: 2rem;
  }

  .fs-rd-header-text h3 {
    font-size: 1.8rem;
  }

  .fs-rd-body {
    padding: 2rem;
  }

  .fs-rd-download-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 1.2rem;
    padding: 1.4rem;
  }

  .fs-rd-download-bar .fs-btn {
    width: 100%;
  }
}
