/* =================================================== */
/* SCRINIA AUTH MODAL STYLES                           */
/* Uses --ip-* design tokens from Scrinia's warm theme */
/* =================================================== */

.sc-auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

.sc-auth-container {
    width: 90%;
    max-width: 440px;
    background: linear-gradient(145deg, #1E2128, #171A1F);
    padding: 40px;
    border-radius: 12px;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
    box-sizing: border-box;
    overflow: hidden;
}

/* Brand header */
.sc-auth-brand {
    text-align: center;
    margin-bottom: 8px;
}

.sc-auth-brand-name {
    font-family: 'Inter', sans-serif;
    font-size: 22px;
    font-weight: 700;
    color: #EDEDEB;
    letter-spacing: -0.02em;
}

.sc-auth-brand-dot {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #5B8EC9;
    margin-left: 2px;
    vertical-align: super;
}

.sc-auth-title {
    margin: 0 0 28px 0;
    color: #EDEDEB;
    font-size: 20px;
    font-weight: 600;
    text-align: center;
    font-family: 'Inter', sans-serif;
}

/* Close button */
.sc-auth-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 36px;
    height: 36px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 50%;
    color: #9A9890;
    cursor: pointer;
    display: none; /* Hidden when app is gated — no close needed */
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.sc-auth-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #EDEDEB;
    border-color: rgba(255, 255, 255, 0.25);
}

/* =================================================== */
/* ACCOUNT TYPE SELECTION                              */
/* =================================================== */

.sc-auth-type-subtitle {
    text-align: center;
    color: #B8B6AE;
    font-size: 14px;
    margin: 0 0 20px 0;
    font-family: 'Inter', sans-serif;
}

.sc-account-type-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sc-account-type-card {
    display: flex;
    flex-direction: column;
    background: #252930;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    padding: 16px 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    font-family: 'Inter', sans-serif;
    position: relative;
    overflow: hidden;
}

.sc-account-type-card:hover {
    background: #2E3239;
    border-color: rgba(91, 142, 201, 0.4);
}

.sc-account-type-card.selected {
    border-color: #5B8EC9;
    background: rgba(91, 142, 201, 0.1);
    box-shadow: 0 0 0 1px rgba(91, 142, 201, 0.3);
}

.sc-card-main-row {
    display: flex;
    align-items: center;
    gap: 14px;
}

.sc-card-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(91, 142, 201, 0.1);
    border-radius: 8px;
    flex-shrink: 0;
}

.sc-card-icon svg {
    width: 18px;
    height: 18px;
    stroke: #5B8EC9;
}

.sc-card-text {
    flex: 1;
}

.sc-card-text strong {
    display: block;
    color: #EDEDEB;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 2px;
}

.sc-card-text span {
    display: block;
    color: #9A9890;
    font-size: 12px;
}

.sc-card-radio {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.sc-account-type-card.selected .sc-card-radio {
    border-color: #5B8EC9;
    background: #5B8EC9;
}

.sc-card-radio svg {
    width: 12px;
    height: 12px;
    stroke: white;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.2s ease;
}

.sc-account-type-card.selected .sc-card-radio svg {
    opacity: 1;
    transform: scale(1);
}

.sc-card-features {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sc-feature-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #B8B6AE;
}

.sc-feature-item svg {
    width: 14px;
    height: 14px;
    stroke: #3DBB9E;
    flex-shrink: 0;
}

.sc-feature-item.highlight span {
    color: #3DBB9E;
}

.sc-card-badge {
    position: absolute;
    top: 0;
    right: 0;
    background: linear-gradient(135deg, #5B8EC9, #3DBB9E);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 0 8px 0 8px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 4px;
}

.sc-card-badge svg {
    width: 12px;
    height: 12px;
    stroke: white;
}

/* =================================================== */
/* AUTH FORM                                           */
/* =================================================== */

.sc-auth-form-group {
    margin-bottom: 14px;
}

.sc-auth-name-row {
    display: flex;
    gap: 12px;
}

.sc-auth-input {
    width: 100%;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 8px;
    color: #EDEDEB;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.sc-auth-input::placeholder {
    color: #9A9890;
}

.sc-auth-input:focus {
    outline: none;
    border-color: rgba(91, 142, 201, 0.6);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 3px rgba(91, 142, 201, 0.15);
}

/* Back button / type selector */
.sc-auth-type-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    cursor: pointer;
    margin-bottom: 18px;
    font-family: 'Inter', sans-serif;
    transition: all 0.2s ease;
    width: 100%;
    box-sizing: border-box;
}

.sc-auth-type-selector:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.sc-auth-type-selector-arrow svg {
    width: 16px;
    height: 16px;
    stroke: #9A9890;
}

.sc-auth-type-selector-content {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.sc-auth-type-selector-icon svg {
    width: 16px;
    height: 16px;
    stroke: #5B8EC9;
}

.sc-auth-type-selector-text {
    color: #EDEDEB;
    font-size: 13px;
    font-weight: 500;
}

.sc-auth-type-selector-change {
    color: #5B8EC9;
    font-size: 12px;
    font-weight: 500;
}

/* Submit button */
.sc-auth-submit-btn {
    width: 100%;
    padding: 14px;
    margin-top: 8px;
    font-size: 15px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    background: linear-gradient(135deg, #5B8EC9 0%, #7BAAD8 100%);
    border: none;
    color: white;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.sc-auth-submit-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(91, 142, 201, 0.35);
}

.sc-auth-submit-btn:active {
    transform: translateY(0);
}

.sc-auth-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Switch link */
.sc-auth-switch {
    text-align: center;
    margin-top: 20px;
    margin-bottom: 0;
    color: #9A9890;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
}

.sc-auth-switch a {
    color: #5B8EC9;
    cursor: pointer;
    text-decoration: none;
    transition: color 0.2s ease;
}

.sc-auth-switch a:hover {
    color: #7BAAD8;
    text-decoration: underline;
}

/* =================================================== */
/* TERMS CHECKBOX                                      */
/* =================================================== */

.sc-auth-terms-group {
    margin-top: 4px;
    margin-bottom: 14px;
    display: none;
}

.sc-auth-terms-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    user-select: none;
}

.sc-auth-terms-checkbox {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.sc-auth-terms-checkmark {
    width: 18px;
    height: 18px;
    min-width: 18px;
    background: rgba(255, 255, 255, 0.06);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    margin-top: 1px;
}

.sc-auth-terms-checkmark svg {
    width: 12px;
    height: 12px;
    stroke: white;
    opacity: 0;
    transform: scale(0.5);
    transition: all 0.2s ease;
}

.sc-auth-terms-label:hover .sc-auth-terms-checkmark {
    border-color: rgba(91, 142, 201, 0.6);
    background: rgba(91, 142, 201, 0.1);
}

.sc-auth-terms-checkbox:checked + .sc-auth-terms-checkmark {
    background: #5B8EC9;
    border-color: transparent;
}

.sc-auth-terms-checkbox:checked + .sc-auth-terms-checkmark svg {
    opacity: 1;
    transform: scale(1);
}

.sc-auth-terms-text {
    font-size: 12px;
    color: #B8B6AE;
    line-height: 1.5;
    font-family: 'Inter', sans-serif;
}

.sc-auth-terms-link {
    color: #5B8EC9;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.sc-auth-terms-link:hover {
    color: #7BAAD8;
    text-decoration: underline;
}

.sc-auth-terms-group.error .sc-auth-terms-checkmark {
    border-color: #E5574F;
    background: rgba(229, 87, 79, 0.1);
    animation: sc-shake 0.4s ease;
}

.sc-auth-terms-group.error .sc-auth-terms-text {
    color: #E5574F;
}

@keyframes sc-shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

/* =================================================== */
/* INLINE ERROR MESSAGE                                */
/* =================================================== */

.sc-auth-inline-error {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(229, 87, 79, 0.1);
    border: 1px solid rgba(229, 87, 79, 0.3);
    border-radius: 8px;
    margin-bottom: 14px;
    animation: sc-errorSlideIn 0.3s ease;
}

.sc-auth-inline-error svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    stroke: #E5574F;
}

.sc-auth-inline-error span {
    font-size: 13px;
    font-weight: 500;
    color: #fca5a5;
    line-height: 1.4;
    font-family: 'Inter', sans-serif;
}

@keyframes sc-errorSlideIn {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
