/**
 * Authentication Pages Styles (Login & Register)
 * 
 * Design: Compass Style - Minimalist, High Contrast
 * Container: 1200px centered
 * 
 * @package Sokna
 * @since 1.0.0
 */

/* Container - Shared with other pages */
.container-1200 {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

/* Auth Page Wrapper */
.auth-page-wrapper {
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 0;
}

.auth-form-container {
    width: 100%;
    max-width: 450px;
    margin: 0 auto;
    background-color: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    padding: 40px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.auth-page-title {
    font-size: 28px;
    font-weight: 600;
    color: #000000;
    margin: 0 0 30px 0;
    text-align: center;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #000000;
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    color: #000000;
    background-color: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.form-control:focus {
    outline: none;
    border-color: #000000;
}

.form-group-checkbox {
    display: flex;
    align-items: center;
}

.form-group-checkbox label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0;
    cursor: pointer;
}

.form-group-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.btn-primary {
    background-color: #000000;
    color: #ffffff;
    border-color: #000000;
}

.btn-primary:hover {
    background-color: #333333;
    border-color: #333333;
}

.btn-outline {
    background-color: transparent;
    color: #000000;
    border-color: rgba(0, 0, 0, 0.2);
}

.btn-outline:hover {
    background-color: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.3);
}

.btn-block {
    display: block;
    width: 100%;
}

/* Auth Links */
.auth-links {
    margin-top: 24px;
    text-align: center;
    font-size: 14px;
    color: #666666;
}

.auth-links a {
    color: #000000;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.auth-links a:hover {
    opacity: 0.7;
}

.auth-separator {
    margin: 0 12px;
    color: #cccccc;
}

/* Error Messages */
.auth-error {
    background-color: #f5f5f5;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    padding: 12px 16px;
    margin-bottom: 20px;
    color: #000000;
    font-size: 14px;
}

/* RTL Support */
[dir="rtl"] .auth-form-container,
html[lang="ar"] .auth-form-container {
    text-align: right;
}

[dir="rtl"] .form-group-checkbox,
html[lang="ar"] .form-group-checkbox {
    flex-direction: row-reverse;
}

/* Account Type Selector */
.account-type-group {
    margin-bottom: 30px;
}

.form-label-required::after {
    content: ' *';
    color: #000000;
}

.account-type-selector {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 12px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.account-type-card {
    display: block;
    cursor: pointer;
    position: relative;
}

.account-type-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.account-type-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 28px 20px;
    border: 2px solid rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    background-color: #ffffff;
    transition: all 0.3s ease;
    height: 100%;
    position: relative;
    justify-content: flex-start;
}

.account-type-content svg {
    width: 32px;
    height: 32px;
    margin-bottom: 14px;
    color: #666666;
    transition: color 0.3s ease;
    flex-shrink: 0;
}

.account-type-content h3 {
    font-size: 16px;
    font-weight: 600;
    color: #000000;
    margin: 0 0 8px 0;
    flex-shrink: 0;
}

.account-type-content p {
    display: block;
    font-size: 13px;
    color: #666666;
    margin: 0;
    line-height: 1.4;
    flex-grow: 1;
    margin-top: auto;
    padding-top: 8px;
}

/* Selected State */
.account-type-card input[type="radio"]:checked + .account-type-content {
    border-color: #000000;
    border-width: 2px;
    background-color: #f5f5f5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.account-type-card input[type="radio"]:checked + .account-type-content::after {
    content: '';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    background-color: #000000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 12px;
}

.account-type-card input[type="radio"]:checked + .account-type-content svg {
    color: #000000;
}

/* Hover State */
.account-type-card:hover .account-type-content {
    border-color: rgba(0, 0, 0, 0.3);
    background-color: #fafafa;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.account-type-card:hover .account-type-content svg {
    color: #000000;
}

/* Register Form Container - Wider for account type selector */
.register-form-container {
    max-width: 800px;
    width: 100%;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .auth-page-wrapper {
        padding: 40px 0;
    }
    
    .auth-form-container {
        padding: 30px 20px;
        margin: 0 20px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .register-form-container {
        max-width: 100%;
        width: 100%;
    }
    
    .auth-page-title {
        font-size: 24px;
    }
    
    /* Mobile: Keep 2-column grid for account type cards */
    .account-type-selector {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
        max-width: 100%;
    }
    
    /* Compact account type cards on mobile */
    .account-type-content {
        padding: 18px 12px;
    }
    
    .account-type-content svg {
        width: 28px;
        height: 28px;
        margin-bottom: 10px;
    }
    
    .account-type-content h3 {
        font-size: 14px;
        margin: 0 0 4px 0;
    }
    
    .account-type-content p {
        display: none; /* Hide description on mobile for compactness */
    }
    
    /* Smaller checkmark on mobile */
    .account-type-card input[type="radio"]:checked + .account-type-content::after {
        width: 18px;
        height: 18px;
        top: 6px;
        right: 6px;
        background-size: 10px;
    }
    
    /* Remove hover lift on mobile */
    .account-type-card:hover .account-type-content {
        transform: none;
    }
    
    /* Reduce form group spacing on mobile */
    .form-group {
        margin-bottom: 16px;
    }
    
    .account-type-group {
        margin-bottom: 20px;
    }
    
    .form-label-required {
        font-size: 13px;
    }
}

/* Extra small mobile devices - Still keep 2 columns for compact layout */
@media (max-width: 480px) {
    .account-type-selector {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        max-width: 100%;
    }
    
    .account-type-content {
        padding: 16px 10px;
    }
    
    .account-type-content svg {
        width: 26px;
        height: 26px;
        margin-bottom: 8px;
    }
    
    .account-type-content h3 {
        font-size: 13px;
        margin: 0;
    }
    
    .account-type-content p {
        display: none; /* Keep hidden on small mobile */
    }
    
    .auth-form-container {
        padding: 24px 16px;
        margin: 0 16px;
    }
}

/* RTL Support */
[dir="rtl"] .account-type-content,
html[lang="ar"] .account-type-content {
    text-align: center;
}

