/* ============================================
   NuevoSub Auth Pages - Rekonise Style
   ============================================ */

/* Base Reset for Auth Pages */
.auth-body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #ffffff;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Logo Section */
.auth-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 32px;
}

.auth-logo img {
    height: 40px;
    width: auto;
}

.auth-logo-text {
    font-size: 28px;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

/* Page Title */
.auth-title {
    font-size: 24px;
    font-weight: 600;
    color: #111827;
    text-align: center;
    margin: 0 0 32px 0;
}

/* Card Container */
.auth-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    padding: 32px 36px;
    width: 100%;
    max-width: 420px;
    margin-bottom: 24px;
}

/* Social Login Buttons */
.social-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 24px;
}

.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 9999px;
    background: #ffffff;
    color: #374151;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    font-family: inherit;
    -webkit-appearance: none;
    appearance: none;
}

.btn-social:hover {
    background: #f9fafb;
    border-color: #d1d5db;
    color: #374151;
    text-decoration: none;
}

.btn-social img,
.btn-social svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    object-fit: contain;
}

/* postLink wraps each button in a form - fix the form layout */
.social-buttons form {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
}

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 24px 0;
    color: #9ca3af;
    font-size: 14px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e5e7eb;
}

.auth-divider span {
    padding: 0 16px;
    white-space: nowrap;
}

/* Form Groups */
.auth-form .form-group {
    margin-bottom: 16px;
}

/* Override CakePHP's generated .input wrapper */
.auth-form .input {
    display: block;
    margin: 0;
    padding: 0;
}

/* Form Inputs */
.auth-form .form-control {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 50px;
    font-size: 15px;
    color: #111827;
    background: #ffffff;
    transition: all 0.2s ease;
    box-sizing: border-box;
    font-family: inherit;
    display: block;
}

.auth-form .form-control::placeholder {
    color: #9ca3af;
}

.auth-form .form-control:focus {
    outline: none;
    border-color: #6b7280;
    box-shadow: none;
}

/* Input with icon (password visibility toggle) */
.input-with-icon {
    position: relative;
}

.input-with-icon .input {
    position: static;
}

.input-with-icon .form-control {
    padding-right: 48px;
}

.input-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
    display: flex;
    align-items: center;
    z-index: 2;
    line-height: 1;
}

.input-icon:hover {
    color: #6b7280;
}

/* Validation States */
.auth-form .input.error .form-control,
.auth-form .form-control.is-invalid {
    border-color: #e21e1e;
}

.auth-form .error-message,
.auth-form .invalid-feedback {
    color: #e21e1e;
    font-size: 13px;
    margin-top: 6px;
    display: block;
}

/* Form Actions Row */
.auth-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 24px;
}

/* Forgot Password Link */
.forgot-link {
    color: #6b7280;
    font-size: 14px;
    text-decoration: none;
    transition: color 0.2s ease;
}

.forgot-link:hover {
    color: #111827;
}

/* Primary Submit Button */
.btn-primary-auth {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 32px;
    background: #e21e1e;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: 9999px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    font-family: inherit;
    letter-spacing: 0.3px;
}

.btn-primary-auth:hover {
    background: #b91c1c;
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.3);
    transform: translateY(-1px);
}

.btn-primary-auth:active {
    transform: translateY(0);
    box-shadow: none;
}

.btn-primary-auth:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.3);
}

/* Full width button variant */
.btn-primary-auth.btn-block {
    width: 100%;
}

/* Footer Link */
.auth-footer {
    text-align: center;
    font-size: 14px;
    color: #6b7280;
}

.auth-footer a {
    color: #e21e1e;
    font-weight: 500;
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Remember Me / Terms Checkbox */
.auth-remember,
.auth-terms {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 14px;
    color: #374151;
}

.auth-remember {
    align-items: center;
}

.auth-remember input[type="checkbox"],
.auth-terms input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #e21e1e;
    cursor: pointer;
    flex-shrink: 0;
    margin-top: 2px;
}

.auth-remember input[type="checkbox"] {
    margin-top: 0;
}

.auth-terms label {
    cursor: pointer;
    user-select: none;
    line-height: 1.5;
    color: #6b7280;
}

.auth-terms label a {
    color: #e21e1e;
    text-decoration: none;
    font-weight: 500;
}

.auth-terms label a:hover {
    text-decoration: underline;
}

/* Form options row (remember + forgot) — legacy, kept for back-compat */
.auth-form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 8px;
}

/* Actions row: forgot password (left) + sign in button (right) */
.auth-form-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 24px;
}

.auth-forgot {
    font-size: 14px;
    color: #e21e1e;
    text-decoration: none;
    transition: color 0.2s;
    white-space: nowrap;
}

.auth-forgot:hover {
    color: #b91c1c;
    text-decoration: underline;
}

/* Captcha */
.captcha-container {
    margin-bottom: 16px;
    text-align: center;
}

/* Flash / Alert Messages */
.message,
.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.message.error,
.alert-danger {
    background: #fef2f2;
    color: #e21e1e;
    border: 1px solid #fecaca;
}

.message.success,
.alert-success {
    background: #f0fdf4;
    color: #16a34a;
    border: 1px solid #bbf7d0;
}

.message.warning,
.alert-warning {
    background: #fffbeb;
    border: 1px solid #fde68a;
    color: #b45309;
}

/* Responsive */
@media (max-width: 480px) {
    .auth-body {
        padding: 20px;
        justify-content: flex-start;
        padding-top: 40px;
    }

    .auth-card {
        padding: 28px 24px;
    }

    .auth-actions,
    .auth-form-actions {
        flex-direction: column-reverse;
        gap: 12px;
    }

    .btn-primary-auth {
        width: 100%;
    }

    .auth-forgot {
        text-align: center;
        width: 100%;
    }

    .auth-form-options {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ============================================
   Cookie Consent Banner - Rekonise Style
   Applied to auth pages (login/register)
   ============================================ */

@keyframes cookieSlideUp {
  from {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
  }
}

#cookie-pop {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 24px;
  z-index: 99999;
  width: calc(100% - 48px);
  max-width: 800px;
  animation: cookieSlideUp 0.4s ease-out forwards;
}

#cookie-pop .container-fluid {
  width: 100%;
  margin: 0;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-radius: 16px;
  background: #ffffff;
  color: #000000;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

#cookie-pop .container-fluid::before {
  content: "🍪";
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.08);
  flex-shrink: 0;
  font-size: 20px;
}

#cookie-pop .col-xs-9,
#cookie-pop .col-xs-3 {
  float: none;
  width: auto;
  padding: 0;
}

#cookie-pop .col-xs-9 {
  flex: 1 1 auto;
  min-width: 0;
}

#cookie-pop .col-xs-3 {
  flex: 0 0 auto;
}

#cookie-pop .cookie-message {
  color: #000000;
  font-size: 14px;
  line-height: 1.5;
  padding: 0;
}

#cookie-pop .cookie-message a {
  color: #000000;
  font-weight: 500;
  text-decoration: underline;
}

#cookie-pop .cookie-message a:hover {
  color: #000000;
}

#cookie-pop .cookie-confirm {
  padding: 0;
  text-align: right;
}

#got-cookie {
  min-width: 100px;
  min-height: 44px;
  padding: 12px 28px;
  border: none;
  border-radius: 999px;
  background: #e21e1e !important;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

#got-cookie:hover,
#got-cookie:focus {
  background: #be123c;
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(225, 29, 72, 0.4);
}

#got-cookie:active {
  transform: translateY(0);
}

@media (max-width: 768px) {
  #cookie-pop {
    bottom: 16px;
    width: calc(100% - 32px);
  }

  #cookie-pop .container-fluid {
    padding: 16px 20px;
    gap: 14px;
  }
}

@media (max-width: 576px) {
  #cookie-pop .container-fluid {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }

  #cookie-pop .container-fluid::before {
    display: none;
  }

  #cookie-pop .cookie-confirm {
    text-align: center;
    width: 100%;
  }

  #got-cookie {
    width: 100%;
    padding: 14px 24px;
  }
}
