/*
 * Custom styles for the Seja Checkout login page.
 *
 * These styles define the layout and colour palette for the custom login form
 * and the registration choice modal. The palette aligns with the colours
 * defined in frontend.css (primary and secondary) and introduces a login
 * accent colour for the main login button.
 */

:root {
    --cktedu-login-accent: #ffa31a; /* amarelo para botão de login */
}

/* Container for the login form. It is vertically centred on the page and styled as a card */
.cktedu-login-wrapper {
    max-width: 450px;
    margin: 0 auto;
    min-height: calc(100vh - 120px);
    padding: 40px 30px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.05);
    text-align: center;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
}

.cktedu-login-logo img {
    max-width: 150px;
    height: auto;
    margin-bottom: 20px;
}

/* Heading style: use the primary colour for better contrast and readability */
.cktedu-login-wrapper h2 {
    font-size: 20px;
    margin-bottom: 20px;
    color: var(--cktedu-primary, #00aeea);
    font-weight: 600;
}

.cktedu-login-register {
    margin-bottom: 20px;
}

/* Make the register button full width like the reference design */
.cktedu-login-register .cktedu-button-primary {
    display: block;
    width: 100%;
    padding-left: 0;
    padding-right: 0;
}

.cktedu-login-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 14px;
}

.cktedu-login-form .cktedu-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px; /* match registration form rounded corners */
    font-size: 16px;
    margin-bottom: 15px;
}

/* Wrapper around input and icon to enable side‑by‑side layout */
/* Wrapper around input and icon to enable side‑by‑side layout and unified border */
.cktedu-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #fff;
    padding: 0;
    margin-bottom: 15px;
}

/* Icon inside the input wrapper */
.cktedu-input-icon {
    color: var(--cktedu-primary, #00aeea);
    font-size: 20px;
    /* These margins were used when an icon preceded the input; no longer needed */
    margin-right: 10px;
    margin-left: 0;
}

/* Password toggle eye icon */
.cktedu-password-toggle {
    cursor: pointer;
    font-size: 20px;
    margin-right: 12px;
    color: var(--cktedu-primary, #00aeea);
}

/* Ensure input spans full width minus icon */
/* Inputs inside wrapper should have no border and occupy full space */
.cktedu-input-wrapper .cktedu-input {
    flex: 1;
    border: none;
    border-radius: 6px;
    padding: 12px;
    font-size: 16px;
    margin: 0;
    background: transparent;
}

/* Labels inside the form groups: ensure they are visible and aligned to the left */
.cktedu-form-group label {
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
    font-weight: 600;
    color: var(--cktedu-text, #262626);
    text-align: left;
}

.cktedu-login-form .cktedu-input:focus {
    border-color: var(--cktedu-primary, #00aeea);
    outline: none;
}

/* Placeholder colour for the input fields */
.cktedu-login-form .cktedu-input::placeholder {
    color: rgba(0, 0, 0, 0.4);
    opacity: 1; /* for Firefox */
}

.cktedu-login-actions {
    display: block;
    margin-top: 20px;
}

.cktedu-login-actions .cktedu-button-login {
    background-color: var(--cktedu-login-accent);
    color: #fff;
    border: none;
    border-radius: 30px;
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
}

.cktedu-login-actions .cktedu-button-login:hover {
    background-color: #e89200;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.cktedu-login-lost {
    font-size: 14px;
    color: var(--cktedu-primary, #00aeea);
    text-decoration: none;
}

.cktedu-login-lost:hover {
    text-decoration: underline;
}

/* Container for the lost password link aligned to the right */
.cktedu-lost-wrapper {
    text-align: right;
    margin-top: 8px;
    margin-bottom: 20px;
}

/* Terms and conditions styling */
.cktedu-terms {
    margin-top: 30px;
    font-size: 12px;
    color: #666;
}

.cktedu-terms a {
    color: var(--cktedu-primary, #00aeea);
    text-decoration: none;
}

.cktedu-terms a:hover {
    text-decoration: underline;
}

/* Toast notifications and loading overlay (login page) */
.cktedu-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
    min-width: 240px;
    max-width: 320px;
    padding: 12px 18px;
    border-radius: 6px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    color: #fff;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    font-size: 14px;
}
.cktedu-toast.show {
    opacity: 1;
    transform: translateY(0);
}
.cktedu-toast-success { background-color: var(--cktedu-success, #07c2a2); }
.cktedu-toast-error { background-color: #ff4d4d; }
.cktedu-toast-info { background-color: var(--cktedu-primary, #00aeea); }
.cktedu-toast-warning { background-color: #ffbb00; }

.cktedu-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cktedu-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #eee;
    border-top-color: var(--cktedu-primary, #00aeea);
    border-radius: 50%;
    animation: cktedu-spin 0.8s linear infinite;
}

@keyframes cktedu-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
/* Fix para garantir que a página de login seja visível em qualquer tema */
body.page .cktedu-login-wrapper {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Garantir que o container principal tenha altura mínima */
body.page .site-content,
body.page .ast-container,
body.page .entry-content {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Remover padding do container do Astra */
body.page .ast-container {
    padding-top: 40px;
    padding-bottom: 40px;
}
