/* ============================================================
   BREITLING SSO — New Design (2026)
   Consolidated stylesheet for all account pages.
   ============================================================ */

/* --- CSS Reset & Base --- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body.login-body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-image: url('/images/login-background.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    height: 100vh;
    min-height: 100%;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    padding: 20px;
}

/* --- Main Card Container --- */
.login-card {
    background: #ffffff;
    width: 100%;
    max-width: 420px;
    border-radius: 28px;
    overflow: hidden;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.4),
                0 0 1px rgba(255, 255, 255, 0.1);
}

/* --- Top Section (Solid Brand Yellow) --- */
.top-section {
    background-color: rgb(255, 199, 44);
    padding: 36px 40px 28px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

/* Two-step pages use slightly more generous padding */
.top-section--step {
    padding: 40px 40px 32px;
}

.brand-logo {
    width: 140px;
    height: auto;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.top-section--step .brand-logo {
    margin-bottom: 24px;
}

.app-pill {
    display: inline-block;
    background: #ffffff;
    color: #000000;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 1;
}

/* --- Bottom Section (Body) --- */
.bottom-section {
    padding: 36px 40px;
    background: #ffffff;
}

.bottom-section--step {
    padding: 48px 40px;
}

/* --- Form Layout — Input Groups --- */
.input-group {
    position: relative;
}

.input-group.username-group {
    margin-top: 5px;
    margin-bottom: 24px;
}

.input-group.password-group {
    margin-bottom: 2px;
}

/* Step pages: single input group with larger bottom margin */
.input-group--step {
    position: relative;
    margin-bottom: 32px;
}

/* Step-2: tighter margin so forgot-password link sits close */
.input-group--step-password {
    position: relative;
    margin-bottom: 4px;
}

/* Wrapper for step-1 error variant (form-group > input-wrapper pattern) */
.form-group--step {
    margin-bottom: 32px;
}

.input-wrapper {
    position: relative;
}

/* --- Icons --- */
.input-group i.left-icon,
.input-wrapper i.left-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: rgb(7, 44, 84);
    font-size: 16px;
    transition: color 0.3s ease;
}

.input-group i.left-icon.has-error,
.input-wrapper i.left-icon.has-error {
    color: #d32f2f;
}

.input-group i.right-icon {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 16px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.input-group i.right-icon:hover {
    color: rgb(7, 44, 84);
}

/* --- Input Fields --- */
.input-group input,
.input-wrapper input {
    width: 100%;
    padding: 16px 48px;
    background: #ffffff;
    border: 2px solid rgb(7, 44, 84);
    border-radius: 8px;
    font-size: 16px;
    color: #000000;
    font-family: inherit;
    font-weight: 500;
    box-shadow: 0 0 0 0 rgba(7, 44, 84, 0), inset 0 2px 4px rgba(0, 0, 0, 0.02);
    transition: border-color 0.3s ease, box-shadow 0.4s ease-out;
}

.input-group input.has-error,
.input-wrapper input.has-error {
    border-color: #d32f2f;
}

.input-group input::placeholder,
.input-wrapper input::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

.input-group input:focus,
.input-wrapper input:focus {
    outline: none;
    border-color: rgb(7, 44, 84);
    box-shadow: 0 0 0 4px rgba(7, 44, 84, 0.15), inset 0 2px 4px rgba(0, 0, 0, 0.01);
}

.input-group input.has-error:focus,
.input-wrapper input.has-error:focus {
    border-color: #d32f2f;
    box-shadow: 0 0 0 4px rgba(211, 47, 47, 0.15), inset 0 2px 4px rgba(0, 0, 0, 0.01);
}

/* --- Error Message (positioned above input) --- */
.error-message {
    position: absolute;
    bottom: 100%;
    left: 0;
    right: 0;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #d32f2f;
    font-size: 13px;
    font-weight: 500;
    animation: fadeInDown 0.3s ease-out forwards;
}

.error-message i {
    margin-right: 6px;
    font-size: 14px;
    line-height: 1;
    padding-top: 3px;
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* --- Forgot Password Link --- */
.forgot-password {
    text-align: right;
    margin-bottom: 17px;
    height: 16px;
    line-height: 16px;
}

/* Step-2 variant: slightly different spacing */
.forgot-password--step {
    margin-bottom: 12px;
}

.forgot-password a {
    font-size: 13px;
    color: #6b7280;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
}

.forgot-password a:hover {
    color: rgb(7, 44, 84);
}

/* --- Primary Button --- */
.btn-primary {
    width: 100%;
    padding: 18px;
    background: rgb(255, 199, 44);
    color: #000000;
    border: none;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-family: inherit;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(255, 199, 44, 0.3);
    transition: transform 0.1s ease;
    position: relative;
    overflow: hidden;
    margin-bottom: 24px;
    display: block;
    text-align: center;
    text-decoration: none;
}

/* Step pages: no bottom margin (no divider below) */
.btn-primary--no-margin {
    margin-bottom: 0;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        to right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.6) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: skewX(-25deg);
    transition: left 1.4s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.btn-primary:hover::after {
    left: 200%;
}

.btn-primary:active {
    transform: scale(0.98);
}

/* --- Divider --- */
.divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin-bottom: 24px;
    color: #6b7280;
    font-size: 13px;
}

.divider::before,
.divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e5e7eb;
}

.divider span {
    padding: 0 16px;
}

/* --- SSO Button --- */
.btn-sso {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 14px;
    background: #ffffff;
    border: 1px solid #d1d5db;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
    transition: background 0.2s ease, border-color 0.2s ease;
    text-decoration: none;
}

.btn-sso:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

.btn-sso svg {
    width: 20px;
    height: 20px;
    margin-right: 12px;
}

.btn-sso span {
    font-size: 15px;
    font-weight: 600;
    color: #111827;
    font-family: inherit;
}

/* --- Card Footer --- */
.card-footer {
    background: #ffffff;
    padding: 24px 40px;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}

.copyright {
    font-size: 12px;
    color: #9ca3af;
}

/* ============================================================
   SECONDARY PAGES (ChangePassword, ResetPassword, Logout,
   LoggedOut, AccessDenied)
   ============================================================ */

/* Page description text */
.page-description {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 24px;
    line-height: 1.5;
}

/* Step pages: pull description closer to section top for consistent spacing */
.page-description--step {
    margin-top: -12px;
}

/* Form groups used in multi-field pages (ChangePassword, ResetPassword) */
.form-group {
    position: relative;
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #1a1a1a;
    margin-bottom: 8px;
}

.form-group input[type="text"],
.form-group input[type="password"] {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    font-family: inherit;
    font-weight: 500;
    border: 2px solid rgb(7, 44, 84);
    border-radius: 8px;
    background: #ffffff;
    color: #000000;
    transition: border-color 0.3s ease, box-shadow 0.4s ease-out;
}

.form-group input[type="text"]:focus,
.form-group input[type="password"]:focus {
    outline: none;
    border-color: rgb(7, 44, 84);
    box-shadow: 0 0 0 4px rgba(7, 44, 84, 0.15);
}

.form-group input[type="text"]::placeholder,
.form-group input[type="password"]::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

.form-group input[readonly] {
    background: #f3f4f6;
    cursor: not-allowed;
    border-color: #d1d5db;
}

/* --- Validation Summary --- */
.validation-summary {
    background: rgba(211, 47, 47, 0.08);
    border: 1px solid #d32f2f;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    color: #d32f2f;
    font-size: 14px;
}

.validation-summary strong {
    display: block;
    margin-bottom: 4px;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.08em;
}

.validation-error {
    color: #d32f2f;
    font-size: 12px;
    margin-top: 6px;
    display: block;
}

/* --- Notification Messages --- */
.notification-errors {
    color: #d32f2f;
    font-size: 14px;
    text-align: center;
    margin-bottom: 16px;
}

.notification-success {
    color: #059669;
    font-size: 14px;
    text-align: center;
    margin-bottom: 16px;
}

.notification-info {
    color: rgb(7, 44, 84);
    font-size: 14px;
    text-align: center;
    margin-bottom: 16px;
}

/* --- Secondary Buttons --- */
.btn-secondary {
    width: 100%;
    padding: 14px;
    background: #ffffff;
    color: #000000;
    border: 2px solid rgb(7, 44, 84);
    border-radius: 14px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
    display: block;
    text-align: center;
    text-decoration: none;
}

.btn-secondary:hover {
    background: #f9fafb;
}

.btn-secondary:active {
    transform: scale(0.98);
}

/* --- Centered Content (Logout, LoggedOut, AccessDenied) --- */
.centered-content {
    text-align: center;
    padding: 8px 0;
    margin-bottom: 24px;
}

.centered-content h4 {
    font-size: 18px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #000000;
    margin-bottom: 12px;
}

.centered-content p {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;
}

/* Button group for Logout (Yes / No) */
.button-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
}

/* --- Link styled as text --- */
.text-link {
    font-size: 13px;
    color: #6b7280;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
    display: inline-block;
    margin-top: 16px;
}

.text-link:hover {
    color: rgb(7, 44, 84);
}

/* --- Back Link (secondary pages) --- */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #6b7280;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s;
    margin-top: 8px;
}

.back-link:hover {
    color: rgb(7, 44, 84);
}

.back-link i {
    font-size: 12px;
    padding-top: 3px;
}

/* --- Success Icon (confirmation states) --- */
.success-icon {
    font-size: 48px;
    color: #059669;
    margin-bottom: 16px;
}

/* --- Hidden iframe (signout) --- */
.signout-iframe {
    width: 0;
    height: 0;
    border: none;
}

/* --- Alert box (invalid login request) --- */
.alert-warning {
    background: rgba(255, 199, 44, 0.15);
    border: 1px solid rgb(255, 199, 44);
    border-radius: 8px;
    padding: 16px 20px;
    color: #92400e;
    font-size: 14px;
    text-align: center;
    max-width: 420px;
}

.alert-warning strong {
    display: block;
    margin-bottom: 4px;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.08em;
}

/* ============================================================
   LOCKOUT BANNER
   Displayed when account or IP is locked out.
   Matches the bold border / high-contrast style of the design.
   ============================================================ */
.lockout-banner {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #d32f2f;
    border: 2px solid #d32f2f;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 28px;
    animation: fadeInDown 0.3s ease-out forwards;
}

/* Reduce top padding of the section when a banner is the first child */
.bottom-section > .lockout-banner:first-child,
.bottom-section--step > .lockout-banner:first-child {
    margin-top: -12px;
}

.lockout-banner > i {
    font-size: 18px;
    color: #ffffff;
    flex-shrink: 0;
}

.lockout-banner strong {
    display: block;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #ffffff;
    margin-bottom: 2px;
}

.lockout-banner p {
    font-size: 13px;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.4;
    margin: 0;
}
