/**
 * Shared auth page shell (sign-in / sign-up) for all SEI brands.
 * Colours come from each brand's css/styles.css (--brand-* variables).
 */

.signin-container {
    max-width: 480px;
    margin: 4rem auto;
    padding: 2rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.signin-header {
    text-align: center;
    margin-bottom: 2rem;
}

.signin-header img {
    max-width: 180px;
    margin-bottom: 1rem;
}

.signin-header h1 {
    color: var(--brand-accent);
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.signin-header p {
    color: #666;
    font-size: 0.95rem;
}

.signup-divider {
    text-align: center;
    margin: 2rem 0 1.5rem;
    padding-top: 2rem;
    border-top: 1px solid #eee;
}

.signup-divider p {
    color: #666;
    font-size: 1rem;
    font-weight: 600;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--brand-text);
    margin-bottom: 0.5rem;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: var(--brand-accent);
}

.submit-btn {
    width: 100%;
    padding: 0.875rem;
    background: var(--brand-accent);
    color: var(--brand-btn-text, #fff);
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
    margin-bottom: 1rem;
}

.submit-btn:hover {
    background: var(--brand-accent-hover);
    color: var(--brand-btn-text, #fff);
}

.submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.divider {
    text-align: center;
    margin: 1.5rem 0;
    position: relative;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #ddd;
}

.divider span {
    position: relative;
    background: #fff;
    padding: 0 1rem;
    color: #666;
    font-size: 0.9rem;
}

.social-section {
    margin-bottom: 1.5rem;
}

.social-label {
    text-align: center;
    color: #666;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

.social-buttons {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.social-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem;
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.92rem;
    font-weight: 600;
    color: #333;
    min-width: 0;
}

.social-btn:hover {
    border-color: var(--brand-accent);
    background: #f9f9f9;
}

.social-btn img,
.social-btn svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.social-btn.google { border-color: #4285f4; }
.social-btn.google:hover { background: #f1f5ff; }
.social-btn.microsoft { border-color: #00a4ef; }
.social-btn.microsoft:hover { background: #f0f9ff; }
.social-btn.facebook { border-color: #1877F2; }
.social-btn.facebook:hover { background: #f0f6ff; }

.social-btn-text { white-space: nowrap; }

@media (max-width: 480px) {
    .social-btn {
        padding: 0.75rem 0.45rem;
        font-size: 0;
        gap: 0;
    }
    .social-btn-text { display: none; }
}

.signin-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}

.signin-footer p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.signin-footer a {
    color: var(--brand-accent);
    text-decoration: none;
    font-weight: 600;
}

.signin-footer a:hover {
    text-decoration: underline;
}

.error-message {
    background: #ffebee;
    color: #c62828;
    padding: 0.875rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    display: none;
}

.forgot-password {
    text-align: right;
    margin-top: -0.25rem;
    margin-bottom: 1.25rem;
}

.forgot-password a {
    color: var(--brand-accent);
    font-size: 0.9rem;
    text-decoration: none;
}

.forgot-password a:hover {
    text-decoration: underline;
}

.signup-free-btn {
    display: block;
    text-align: center;
    text-decoration: none;
}

.creator-code-toggle {
    background: none;
    border: none;
    color: var(--brand-primary, var(--brand-accent));
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.5rem;
}

.creator-code-toggle:hover {
    text-decoration: underline;
}

.creator-code-wrapper {
    text-align: center;
    margin-top: 0.5rem;
}

.creator-code-inner {
    display: none;
    margin-top: 1rem;
}

.creator-code-input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
    box-sizing: border-box;
}

.creator-validate-btn {
    background: var(--brand-primary, var(--brand-accent));
}

.creator-validate-btn:hover {
    background: var(--brand-accent-hover);
}

/* SEI parent-site beta invite block */
.beta-section {
    background: var(--brand-bg-light);
    border: 2px solid var(--brand-accent);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.beta-section.validated {
    background: #e8f5e9;
    border-color: #4caf50;
}

.beta-section h2 {
    color: var(--brand-text);
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
}

.beta-section .beta-hint {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
}

.beta-code-input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    text-transform: uppercase;
    margin-bottom: 1rem;
    box-sizing: border-box;
}

.beta-code-input:focus {
    outline: none;
    border-color: var(--brand-accent);
}

.beta-message {
    font-size: 0.9rem;
    padding: 0.5rem;
    border-radius: 4px;
    margin-top: 0.5rem;
}

.beta-message.success { color: #2e7d32; background: #e8f5e9; }
.beta-message.error { color: #c62828; background: #ffebee; }
.beta-message.info { color: #1976d2; background: #e3f2fd; }

.signup-form-group {
    margin-bottom: 1rem;
}

.signup-form-group label {
    display: block;
    font-weight: 600;
    color: var(--brand-text);
    margin-bottom: 0.5rem;
}

.signup-form-group label .optional {
    font-weight: 400;
    color: #888;
}

.signup-form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
    box-sizing: border-box;
}

.signup-form-group input:focus {
    outline: none;
    border-color: var(--brand-accent);
}

.signup-form-group .field-hint {
    font-size: 0.8rem;
    color: #888;
    margin-top: 0.25rem;
}

.signup-btn {
    width: 100%;
    padding: 0.875rem;
    background: var(--brand-accent);
    color: var(--brand-btn-text, #fff);
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
}

.signup-btn:hover {
    background: var(--brand-accent-hover);
}

.signup-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.signin-link {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
    color: var(--brand-text);
    font-size: 0.875rem;
}

.signin-link a {
    color: var(--brand-accent);
    text-decoration: none;
    font-weight: 600;
}

/* Sign-up: tier selection (CookEat) */
.signup-container {
    max-width: 720px;
    margin: 3rem auto;
    padding: 2rem;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.signup-container.form-view {
    max-width: 480px;
}

.signup-header {
    text-align: center;
    margin-bottom: 2rem;
}

.signup-header img {
    max-width: 180px;
    margin-bottom: 1rem;
}

.signup-header h1 {
    color: var(--brand-accent);
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.signup-header p {
    color: #666;
    font-size: 0.95rem;
}

.tier-cards {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.tier-card {
    flex: 1;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 1.5rem 1rem;
    text-align: center;
    transition: border-color 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.tier-card:hover:not(.disabled) {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.tier-card.disabled {
    opacity: 0.55;
}

.tier-card .tier-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 32px;
}

.tier-card .tier-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.tier-card .tier-title {
    font-size: 1.2rem;
    font-weight: 700;
}

.tier-card .tier-price {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 12px;
}

.tier-card .tier-features {
    list-style: none;
    padding: 0;
    margin: 0 0 16px 0;
    text-align: left;
    font-size: 0.85rem;
    color: #444;
    flex: 1;
}

.tier-card .tier-features li {
    padding: 3px 0;
}

.tier-card .tier-features li::before {
    content: '\2713';
    color: #4caf50;
    font-weight: 700;
    margin-right: 6px;
}

.tier-cta {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 700 !important;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    color: #fff !important;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
    width: 100%;
    text-decoration: none;
    -webkit-text-fill-color: #fff;
}

.tier-cta:hover:not(:disabled),
.tier-cta:focus:not(:disabled),
.tier-cta:active:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    color: #fff !important;
    -webkit-text-fill-color: #fff;
}

.tier-cta:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

.tier-free { border-color: #607d8b; }
.tier-free .tier-title { color: #607d8b; }
.tier-free .tier-cta { background: #607d8b; }

.tier-premium { border-color: #1976d2; }
.tier-premium .tier-title { color: #1976d2; }
.tier-premium .tier-icon { color: #1976d2; }
.tier-premium .tier-cta { background: #1976d2; }

.tier-creator { border-color: var(--brand-primary, var(--brand-accent)); }
.tier-creator .tier-title { color: var(--brand-primary, var(--brand-accent)); }
.tier-creator .tier-icon { color: var(--brand-primary, var(--brand-accent)); }
.tier-creator .tier-cta { background: var(--brand-primary, var(--brand-accent)); }

.creator-code-area {
    display: none;
    margin-top: 12px;
    text-align: left;
}

.creator-code-area input {
    width: 100%;
    padding: 8px 10px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
    text-transform: uppercase;
    margin-bottom: 8px;
    box-sizing: border-box;
}

.creator-code-area input:focus {
    outline: none;
    border-color: var(--brand-primary, var(--brand-accent));
}

.creator-code-area .creator-validate-btn {
    width: 100%;
    padding: 8px;
    background: var(--brand-primary, var(--brand-accent));
    color: #fff;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
}

.creator-code-area .creator-validate-btn:hover {
    background: var(--brand-accent-hover);
}

.creator-code-area .creator-validate-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.creator-code-msg {
    font-size: 0.8rem;
    margin-top: 6px;
    padding: 6px;
    border-radius: 4px;
}

.compare-link {
    text-align: center;
    margin-bottom: 1rem;
}

.compare-link a {
    color: var(--brand-accent);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
}

.compare-link a:hover {
    text-decoration: underline;
}

.back-to-plans {
    display: inline-block;
    margin-bottom: 1rem;
    color: var(--brand-accent);
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.back-to-plans:hover {
    text-decoration: underline;
}

.username-wrapper {
    position: relative;
}

.username-prefix {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.125rem;
    color: #666;
    font-weight: 500;
    pointer-events: none;
}

.username-input {
    padding-left: 2rem !important;
}

@media (max-width: 640px) {
    .tier-cards {
        flex-direction: column;
    }

    .signup-container {
        margin: 1.5rem auto;
        padding: 1.5rem;
    }
}
