/* ============================================================
   ABUNDANCE SCREENING PORTAL
   All rules scoped to body.as-portal-page
   ============================================================ */

/* ----- 0. CSS CUSTOM PROPERTIES ----- */
:root {
  --as-dark: #161a29;
  --as-medium: #2d3954;
  --as-white: #ffffff;
  --as-row-odd: #9fb0cf;
  --as-row-even: #b0c1de;
  --as-error: #cc0000;
  --as-alert-bg: #fff7e6;
  --as-alert-border: #ddd;
  --as-font: 'Gotham', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ----- 1. RESETS & BASE ----- */
body.as-portal-page {
  margin: 0;
  padding: 0;
  font-family: var(--as-font);
  color: var(--as-white);
  background: var(--as-dark);
  -webkit-font-smoothing: antialiased;
}

body.as-portal-page *,
body.as-portal-page *::before,
body.as-portal-page *::after {
  box-sizing: border-box;
}

body.as-portal-page a {
  color: var(--as-white);
}

/* ----- 2. VIDEO BACKGROUND (Pages 1, 2, 3) ----- */
.as-videobg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
}

.as-videobg__video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%);
  object-fit: cover;
}

.as-videobg__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(22, 26, 41, 0.25);
}

/* ----- 3. PORTAL SHELL ----- */
.as-portal {
  position: relative;
  z-index: 1;
}

/* Centered card layout for video bg pages */
body.as-videobg-page .as-portal {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 20px;
}

body.as-videobg-page .as-portal__inner {
  background: var(--as-dark);
  padding: 40px 36px;
  border-radius: 8px;
  width: 100%;
  max-width: 480px;
}

/* Portal pages with header/footer */
body.as-portal-page:not(.as-videobg-page) .as-portal__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px;
}

/* ----- 4. PORTAL HEADER ----- */
.as-portal-header {
  background: var(--as-medium);
  position: relative;
  z-index: 100;
}

.as-portal-header--transparent {
  background: transparent;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
}

/* Extra top breathing room on screening room page only */
body.as-screening-room-page .as-portal-header--transparent {
  top: 20px;
}

.as-portal-header__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.as-portal-header__brand {
  display: inline-flex;
  text-decoration: none;
}

.as-portal-header__logo {
  height: 40px;
  width: auto;
}

/* ----- 5. PORTAL FOOTER ----- */
.as-portal-footer {
  background: var(--as-medium);
  color: var(--as-white);
}

.as-portal-footer__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.as-portal-footer__left {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.as-portal-footer__logo {
  height: 40px;
  width: auto;
  align-self: flex-start;
  object-fit: contain;
}

.as-portal-footer small {
  color: rgba(255, 255, 255, 0.7);
  font-size: 13px;
}

.as-portal-footer__right {
  display: flex;
  align-items: center;
}

/* ----- 6. PORTAL NAV ----- */
.as-portal-nav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 24px;
  align-items: center;
}

.as-portal-nav__link {
  color: var(--as-white);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  opacity: 0.85;
  transition: opacity 0.2s;
}

.as-portal-nav__link:hover,
.as-portal-nav__link:focus {
  opacity: 1;
  text-decoration: underline;
}

/* ----- 7. FORM ELEMENTS ----- */
.as-portal__title {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 700;
  color: var(--as-white);
}

.as-portal__subtitle {
  margin: 0 0 24px;
  font-size: 15px;
  color: rgba(255, 255, 255, 0.75);
}

.as-portal__errors {
  background: rgba(204, 0, 0, 0.15);
  border: 1px solid var(--as-error);
  border-radius: 4px;
  padding: 12px 16px;
  margin-bottom: 20px;
  color: #ff6b6b;
}

.as-portal__errors ul {
  margin: 0;
  padding: 0 0 0 18px;
}

.as-portal__errors li {
  margin-bottom: 4px;
}

.as-field {
  margin-bottom: 16px;
}

.as-field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 6px;
  color: rgba(255, 255, 255, 0.85);
}

.as-field input[type="text"],
.as-field input[type="email"],
.as-field input[type="password"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--as-white);
  font-size: 15px;
  font-family: var(--as-font);
  transition: border-color 0.2s;
}

.as-field input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.6);
}

.as-field input[readonly] {
  opacity: 0.6;
  cursor: not-allowed;
}

.as-field__hint {
  display: block;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 4px;
  font-size: 12px;
}

.as-actions {
  margin-top: 24px;
}

.as-btn {
  display: inline-block;
  padding: 12px 28px;
  background: var(--as-white);
  color: var(--as-dark);
  border: none;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--as-font);
  cursor: pointer;
  transition: opacity 0.2s;
}

.as-btn:hover {
  opacity: 0.9;
}

/* ----- 8. LOGIN FORM (wp_login_form override) ----- */

/* Logo above headline */
.as-login__logo {
  display: block;
  width: 200px;
  height: auto;
  margin: 0 auto 40px;
}

/* Headline: centered, uppercase, gap below */
.as-login h2 {
  margin: 0 0 40px;
  font-size: 22px;
  text-align: center;
  text-transform: uppercase;
  color: var(--as-white);
}

.as-login__headline-light {
  font-weight: 300;
}

.as-login__headline-bold {
  font-weight: 700;
}

/* Card padding override on video bg pages */
body.as-videobg-page .as-login {
  padding: 50px 80px 80px;
  margin: -40px -36px;
}

.as-login .login-username,
.as-login .login-password {
  margin-bottom: 16px;
}

.as-login .login-username label,
.as-login .login-password label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 6px;
  color: rgba(255, 255, 255, 0.85);
}

.as-login input[type="text"],
.as-login input[type="password"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--as-white);
  font-size: 15px;
  font-family: var(--as-font);
}

.as-login input[type="text"]:focus,
.as-login input[type="password"]:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.6);
}

.as-login .login-remember {
  margin: 12px 0;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.75);
}

.as-login .as-btn,
.as-login .login-submit input[type="submit"] {
  display: inline-block;
  width: 100%;
  padding: 12px 28px;
  background: var(--as-white);
  color: var(--as-dark);
  border: none;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--as-font);
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.2s;
}

.as-login .as-btn:hover,
.as-login .login-submit input[type="submit"]:hover {
  background: var(--as-white);
  color: var(--as-dark);
  opacity: 0.9;
}

.as-login__forgot {
  margin-top: 12px;
}

.as-login__forgot a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: underline;
  font-size: 14px;
}

/* Success message (forgot password confirmation) */
.as-success {
  padding: 16px;
  border: 1px solid rgba(46, 157, 70, 0.4);
  background: rgba(46, 157, 70, 0.12);
  border-radius: 4px;
  color: var(--as-white);
  font-size: 14px;
  line-height: 1.5;
}

.as-success p {
  margin: 0;
}

/* Back to login / form navigation link */
.as-form-link {
  margin-top: 16px;
  text-align: center;
}

.as-form-link a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: underline;
  font-size: 14px;
}

/* Error block paragraph (for reset-password token error) */
.as-portal__errors p {
  margin: 0;
}

/* ----- 8b. GO / SIGNUP FORM ----- */

/* Logo above headline */
.as-go__logo {
  display: block;
  width: 200px;
  height: auto;
  margin: 0 auto 40px;
}

/* Card padding override on video bg pages */
body.as-videobg-page .as-go {
  padding: 50px 80px 80px;
  margin: -40px -36px;
}

/* Headline */
.as-go .as-portal__title {
  text-align: center;
  text-transform: uppercase;
  font-size: 22px;
  margin: 0 0 10px;
}

/* Subtitle */
.as-go .as-portal__subtitle {
  text-align: center;
  margin: 0 0 30px;
}

/* Labels */
.as-go .as-field label {
  font-size: 14px;
}

/* Button: full-width, uppercase, white */
.as-go .as-btn {
  display: inline-block;
  width: 100%;
  padding: 12px 28px;
  background: var(--as-white);
  color: var(--as-dark);
  border: none;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--as-font);
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.2s;
}

.as-go .as-btn:hover {
  background: var(--as-white);
  color: var(--as-dark);
  opacity: 0.9;
}

/* ----- 9. ALERT / FLASH MESSAGES ----- */
.as-alert {
  padding: 12px 16px;
  border: 1px solid var(--as-alert-border);
  background: var(--as-alert-bg);
  margin: 12px 0;
  border-radius: 4px;
  color: #333;
}

.as-flash {
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.08);
  margin: 16px 0;
  border-radius: 4px;
  color: var(--as-white);
}

/* ----- 10. SCREENING ROOM (Page 4) ----- */
.as-screening-room {
  background: var(--as-dark);
}

.as-screening-hero {
  position: relative;
  width: 100%;
  max-height: 750px;
  overflow: hidden;
  margin: 0;
  padding: 0;
  line-height: 0;
}

.as-banner img {
  width: 100%;
  height: 750px;
  max-height: 750px;
  object-fit: cover;
  object-position: center center;
  display: block;
}

.as-room-content {
  max-width: 1000px;
  margin: 0 auto;
  padding: 48px 24px;
}

.as-room-content__columns {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 48px;
}

.as-room-content__left {
  flex: 0 0 35%;
  padding-right: 32px;
  border-right: 1px solid rgba(255, 255, 255, 0.2);
  text-align: right;
}

.as-room-content__right {
  flex: 1;
  padding-left: 32px;
}

.as-room-content__left h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  color: var(--as-white);
}

.as-room-content__right p {
  margin: 0;
  font-size: 16px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.85);
}

.as-embed {
  margin-top: 8px;
}

.as-embed iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: none;
}

/* ----- 11. MY SCREENINGS (Page 5 - logged in) ----- */
.as-my-screenings {
  color: var(--as-white);
}

/* Page headline: "MY SCREENING ROOMS" */
.as-my-screenings__title {
  font-size: 24px;
  font-weight: 700;
  text-transform: uppercase;
  margin: 0 0 8px;
  color: var(--as-white);
}

/* Welcome sub-headline for guests */
.as-my-screenings__heading {
  font-size: 16px;
  text-transform: uppercase;
  margin: 0;
  color: rgba(255, 255, 255, 0.75);
}

.as-my-screenings__heading-light {
  font-weight: 300;
}

.as-my-screenings__heading-bold {
  font-weight: 700;
  color: var(--as-white);
}

/* Room cards container */
.as-room-cards {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 900px;
  margin: 50px auto 0;
}

/* Individual card */
.as-room-card {
  border-radius: 16px;
  overflow: hidden;
  background: var(--as-dark);
}

/* Banner wrapper — relative positioned for overlay */
.as-room-card__banner {
  position: relative;
  line-height: 0;
}

/* Banner image — full width, crop top 50px to reduce empty header space */
.as-room-card__banner img {
  width: 100%;
  height: auto;
  display: block;
  margin-top: -50px;
}

/* Bottom-edge gradient overlay */
.as-room-card__gradient {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 35%;
  background: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.98) 100%);
  pointer-events: none;
}

/* Button cluster — absolute positioned lower-right */
.as-room-card__actions {
  position: absolute;
  bottom: 20px;
  right: 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  z-index: 2;
}

/* Ghost button style */
.as-room-card__btn {
  display: inline-block;
  padding: 10px 20px;
  background: transparent;
  border: 2px solid var(--as-white);
  border-radius: 6px;
  color: var(--as-white);
  font-family: var(--as-font);
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  text-decoration: none;
  letter-spacing: 0.5px;
  line-height: 1.2;
  cursor: pointer;
  transition: background 0.2s;
}

.as-room-card__btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--as-white);
  text-decoration: none;
}

/* Secondary variant (Manage Guests) — smaller/subtler */
.as-room-card__btn--secondary {
  font-size: 12px;
  padding: 8px 16px;
  border-color: rgba(255, 255, 255, 0.6);
  color: rgba(255, 255, 255, 0.8);
}

.as-room-card__btn--secondary:hover {
  background: rgba(255, 255, 255, 0.15);
  color: var(--as-white);
  border-color: var(--as-white);
}

/* No-banner fallback */
.as-room-card__banner--empty {
  padding: 60px 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1.4;
}

.as-room-card__fallback-name {
  font-size: 22px;
  font-weight: 700;
  color: var(--as-white);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* When no banner, position buttons below the name */
.as-room-card__actions--no-banner {
  position: static;
  padding: 0 24px 24px;
  align-items: center;
}

/* ----- 12. MANAGE GUESTS (Page 6) ----- */
.as-manage-guests {
  color: var(--as-white);
}

.as-manage-guests__title {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 700;
}

.as-manage-guests__card {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 24px;
  margin-bottom: 32px;
}

.as-manage-guests__card h3 {
  margin: 0 0 16px;
  font-size: 18px;
}

.as-manage-guests__slots {
  font-size: 16px;
  color: rgba(255, 255, 255, 0.75);
  margin: 4px 0 16px;
}

.as-manage-guests__slots strong {
  color: var(--as-white);
}

.as-manage-guests__form {
  margin-top: 16px;
}

.as-manage-guests__card .as-field input {
  background: rgba(255, 255, 255, 0.12);
}

.as-manage-guests__form .as-btn {
  background: var(--as-white);
  color: var(--as-dark);
  font-weight: 700;
  text-transform: uppercase;
  border: none;
  border-radius: 4px;
  padding: 12px 28px;
  font-size: 15px;
  font-family: var(--as-font);
  cursor: pointer;
  transition: opacity 0.2s;
}

.as-manage-guests__form .as-btn:hover {
  opacity: 0.9;
}

.as-manage-guests__back {
  margin-top: 24px;
}

.as-manage-guests__back a {
  color: rgba(255, 255, 255, 0.7);
  text-decoration: underline;
  font-size: 14px;
}

/* ----- 13. GUEST TABLE ----- */
.as-guest-section {
  margin-bottom: 32px;
}

.as-guest-section__heading {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--as-white);
}

.as-guest-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  table-layout: fixed;
}

.as-guest-table th {
  text-align: left;
  padding: 10px 12px;
  font-weight: 600;
  color: var(--as-white);
  background: var(--as-medium);
  border-bottom: 2px solid rgba(255, 255, 255, 0.15);
}

/* Consistent column widths across all 3 sections */
.as-guest-table th:nth-child(1),
.as-guest-table td:nth-child(1) {
  width: 30%;
}

.as-guest-table th:nth-child(2),
.as-guest-table td:nth-child(2) {
  width: 40%;
}

.as-guest-table th:nth-child(3),
.as-guest-table td:nth-child(3) {
  width: 30%;
}

.as-guest-table td {
  padding: 10px 12px;
  color: #111;
}

/* Alternating row colors - light blues from #2d3954 family */
.as-guest-table tbody tr:nth-child(odd) {
  background: var(--as-row-odd);
}

.as-guest-table tbody tr:nth-child(even) {
  background: var(--as-row-even);
}

.as-guest-table td a {
  color: var(--as-dark);
  font-weight: 500;
  text-decoration: underline;
}

.as-guest-section__empty {
  color: rgba(255, 255, 255, 0.5);
  font-style: italic;
  font-size: 14px;
}

/* ----- 14. INVITE SETUP (Accept Invite form) ----- */

/* Logo centered at top */
.as-invite-setup__logo {
  display: block;
  width: 200px;
  height: auto;
  margin: 0 auto 40px;
}

/* Card padding override on video bg pages (matches login) */
body.as-videobg-page .as-invite-setup {
  padding: 50px 80px 80px;
  margin: -40px -36px;
}

.as-invite-setup h2 {
  margin: 0 0 40px;
  font-size: 22px;
  text-align: center;
  text-transform: uppercase;
  color: var(--as-white);
}

.as-invite-setup__headline-light {
  font-weight: 300;
}

.as-invite-setup__headline-bold {
  font-weight: 700;
}

.as-invite-setup>p {
  color: rgba(255, 255, 255, 0.75);
  font-size: 14px;
  margin: 0 0 20px;
}

.as-invite-setup .as-field label {
  font-size: 14px;
}

.as-invite-setup__error {
  padding: 10px 14px;
  border: 1px solid var(--as-error);
  background: rgba(204, 0, 0, 0.15);
  margin: 12px 0;
  border-radius: 4px;
  color: #ff6b6b;
}

/* Button matches login: full width, uppercase */
.as-invite-setup .as-btn {
  display: inline-block;
  width: 100%;
  padding: 12px 28px;
  background: var(--as-white);
  color: var(--as-dark);
  border: none;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--as-font);
  text-transform: uppercase;
  cursor: pointer;
  transition: opacity 0.2s;
}

.as-invite-setup .as-btn:hover {
  background: var(--as-white);
  color: var(--as-dark);
  opacity: 0.9;
}

/* ----- 15. PASSWORD TOGGLE (extracted from invites.php) ----- */
.as-pass-wrap {
  position: relative;
  display: block;
}

.as-pass-wrap input {
  width: 100%;
  padding: 10px 40px 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--as-white);
  font-size: 15px;
  font-family: var(--as-font);
}

.as-pass-wrap input:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.6);
}

.as-pass-toggle {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  cursor: pointer;
  color: rgba(255, 255, 255, 0.5);
  font-size: 18px;
}

.as-pass-toggle:hover {
  color: var(--as-white);
}

.as-pass-hint {
  display: block;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 6px;
  font-size: 12px;
}

.as-valid {
  border-color: #2e9d46 !important;
  box-shadow: 0 0 0 2px rgba(46, 157, 70, 0.15);
}

.as-invalid {
  border-color: var(--as-error) !important;
  box-shadow: 0 0 0 2px rgba(204, 0, 0, 0.12);
}

/* ----- 16. RESPONSIVE ----- */

/* Tablet */
@media (max-width: 768px) {
  .as-room-content__columns {
    flex-direction: column;
  }

  .as-room-content__left {
    padding-right: 0;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 24px;
    margin-bottom: 24px;
  }

  .as-room-content__right {
    padding-left: 0;
  }

  .as-guest-table {
    font-size: 13px;
  }

  .as-guest-table th,
  .as-guest-table td {
    padding: 8px;
  }

  .as-portal-header__inner {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .as-portal-footer__inner {
    flex-direction: column;
    gap: 16px;
    align-items: center;
    text-align: center;
  }

  .as-portal-footer__left {
    align-items: center;
  }

  .as-portal-nav__list {
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
  }

  body.as-videobg-page .as-login {
    padding: 50px 40px 80px;
    margin: -40px -36px;
  }

  body.as-videobg-page .as-invite-setup {
    padding: 50px 40px 80px;
    margin: -40px -36px;
  }

  body.as-videobg-page .as-go {
    padding: 50px 40px 80px;
    margin: -40px -36px;
  }

  /* Room cards: mobile layout */
  .as-room-card__gradient {
    display: none;
  }

  .as-room-card__actions {
    position: static;
    padding: 16px;
    flex-direction: column;
    align-items: stretch;
    background: var(--as-dark);
  }

  .as-room-card__btn {
    text-align: center;
    width: 100%;
  }
}

/* Mobile */
@media (max-width: 480px) {
  body.as-videobg-page .as-portal__inner {
    padding: 28px 20px;
  }

  body.as-videobg-page .as-login {
    padding: 30px 24px 40px;
    margin: -28px -20px;
  }

  body.as-videobg-page .as-invite-setup {
    padding: 30px 24px 40px;
    margin: -28px -20px;
  }

  body.as-videobg-page .as-go {
    padding: 30px 24px 40px;
    margin: -28px -20px;
  }

  .as-portal__title {
    font-size: 20px;
  }

  .as-guest-section {
    overflow-x: auto;
  }

  .as-guest-table {
    min-width: 500px;
  }

  .as-room-content {
    padding: 24px 16px;
  }
}

/* Ultra-wide: stop banner from stretching past 1800px */
@media (min-width: 1800px) {
  .as-screening-hero {
    max-width: 1800px;
    margin: 0 auto;
  }

  .as-banner img {
    object-fit: contain;
    height: auto;
    max-height: 750px;
  }
}