/**
 * Kajarbi Job Portal - Authentication Styles
 */

/* Auth Container */
.kajarbi-auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: 40px 20px;
}

.kajarbi-auth-box {
    background: #1A1A2E;
    border-radius: 12px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    padding: 40px;
    width: 100%;
    max-width: 520px;
}

.kajarbi-auth-message {
    text-align: center;
    padding: 40px;
    background: #f8f9fa;
    border-radius: 12px;
}

.kajarbi-auth-message p {
    margin-bottom: 20px;
    font-size: 16px;
    color: #495057;
}

/* Auth Header */
.auth-header {
    text-align: center;
    margin-bottom: 32px;
}

.auth-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    margin: 0 0 8px 0;
}

.auth-header p {
    color: #6c757d;
    font-size: 15px;
    margin: 0;
}

/* Auth Messages */
.auth-messages {
    padding: 14px 18px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    line-height: 1.5;
}

.auth-messages.error {
    background: #fff0f0;
    border: 1px solid #ffcccb;
    color: #c41e3a;
}

.auth-messages.success {
    background: #f0fff4;
    border: 1px solid #9ae6b4;
    color: #276749;
}

/* User Type Selection */
.user-type-selection {
    margin-bottom: 24px;
}

.user-type-selection > label {
    display: block;
    margin-bottom: 12px;
    font-weight: 600;
    color: #212529;
}

.user-type-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.user-type-option {
    cursor: pointer;
}

.user-type-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.user-type-option .option-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 16px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    text-align: center;
    transition: all 0.2s ease;
    width: 100%;
}

.user-type-option:hover .option-box {
    border-color: #adb5bd;
}

.user-type-option input[type="radio"]:checked + .option-box,
.user-type-option.selected .option-box {
    border-color: var(--kajarbi-brand, #c9a227);
    background: rgba(201, 162, 39, 0.04);
}

.user-type-option .option-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f3f5;
    border-radius: 50%;
    margin-bottom: 12px;
    color: #495057;
    transition: all 0.2s ease;
}

.user-type-option input[type="radio"]:checked + .option-box .option-icon {
    background: var(--kajarbi-brand, #c9a227);
    color: #fff;
}

.user-type-option .option-title {
    font-weight: 600;
    color: #4e4f51;
    font-size: 15px;
    margin-bottom: 4px;
}

.user-type-option .option-desc {
    font-size: 12px;
    color: #6c757d;
}

/* Form Groups */
.kajarbi-auth-form .form-row {
    display: flex;
    gap: 16px;
}

.kajarbi-auth-form .form-group {
    margin-bottom: 20px;
}

.kajarbi-auth-form .form-group.half {
    flex: 1;
}

.kajarbi-auth-form label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
    color: #212529;
    margin-bottom: 6px;
    font-size: 14px;
}

.kajarbi-auth-form label .required {
    color: #dc3545;
}

.kajarbi-auth-form .forgot-password-link {
    font-weight: 400;
    font-size: 13px;
    color: var(--kajarbi-brand, #c9a227);
    text-decoration: none;
}

.kajarbi-auth-form .forgot-password-link:hover {
    text-decoration: underline;
}

/* Form Inputs */
.kajarbi-auth-form input[type="text"],
.kajarbi-auth-form input[type="email"],
.kajarbi-auth-form input[type="password"],
.kajarbi-auth-form input[type="tel"],
.kajarbi-auth-form input[type="url"],
.kajarbi-auth-form select {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    font-size: 15px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.kajarbi-auth-form input:focus,
.kajarbi-auth-form select:focus {
    outline: none;
    border-color: var(--kajarbi-brand, #c9a227);
    box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.1);
}

.kajarbi-auth-form input::placeholder {
    color: #adb5bd;
}

.kajarbi-auth-form .field-hint {
    display: block;
    font-size: 12px;
    color: #6c757d;
    margin-top: 4px;
}

/* Password Field */
.password-field {
    position: relative;
}

.password-field input {
    padding-right: 44px;
}

.password-field .toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #6c757d;
    opacity: 0.7;
    transition: opacity 0.2s;
    display: flex;
    align-items: center;
}

.password-field .toggle-password:hover {
    opacity: 1;
}

/* Checkbox Group */
.checkbox-group {
    margin: 24px 0;
}

.checkbox-label {
    display: flex !important;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-weight: 400 !important;
}

.checkbox-label input[type="checkbox"] {
    margin-top: 3px;
    width: 18px;
    height: 18px;
    accent-color: var(--kajarbi-brand, #c9a227);
}

.checkbox-label span {
    font-size: 14px;
    color: #495057;
    line-height: 1.5;
}

.checkbox-label a {
    color: var(--kajarbi-brand, #c9a227);
    text-decoration: none;
}

.checkbox-label a:hover {
    text-decoration: underline;
}

/* Buttons */
.kajarbi-auth-form .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    box-sizing: border-box;
}

.kajarbi-auth-form .btn-block {
    width: 100%;
}

.kajarbi-auth-form .btn-lg {
    padding: 16px 28px;
    font-size: 16px;
}

.kajarbi-auth-form .btn-primary {
    background: var(--kajarbi-brand, #c9a227);
    color: #fff;
}

.kajarbi-auth-form .btn-primary:hover {
    background: var(--kajarbi-brand-dark, #b8942a);
}

.kajarbi-auth-form .btn-primary:disabled {
    background: #adb5bd;
    cursor: not-allowed;
}

.kajarbi-auth-form .btn-outline {
    background: #fff;
    color: #212529;
    border: 1.5px solid #e0e0e0;
}

.kajarbi-auth-form .btn-outline:hover {
    border-color: var(--kajarbi-brand, #c9a227);
    color: var(--kajarbi-brand, #c9a227);
}

/* Loading State */
.btn-loading {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-loading .spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Auth Divider */
.auth-divider {
    display: flex;
    align-items: center;
    margin: 24px 0;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e9ecef;
}

.auth-divider span {
    padding: 0 16px;
    color: #6c757d;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Auth Footer */
.auth-footer {
    text-align: center;
    margin-top: 24px;
}

.auth-footer p {
    color: #495057;
    font-size: 14px;
    margin-bottom: 16px;
}

.auth-footer a {
    color: var(--kajarbi-brand, #c9a227);
    text-decoration: none;
    font-weight: 500;
}

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

/* Register Options */
.register-options {
    display: flex;
    gap: 12px;
    justify-content: center;
}

.register-options .btn {
    flex: 1;
    max-width: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 5px;
}
.register-options .btn:hover {
    background-color: var(--kajarbi-brand-dark, #b8942a);
    color: #fff;
    text-decoration: none;
}

/* Employer/Job Seeker Fields Animation */
.employer-fields,
.job-seeker-fields {
    overflow: hidden;
}

.checkbox-label{
    display: block !important;
}

/* ================================================
   Phase 2: Role Selection Styles
   ================================================ */

.kajarbi-role-selection-box {
    max-width: 700px;
}

.role-selection-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 8px;
}

.role-option {
    cursor: pointer;
    display: block;
}

.role-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.role-option-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 28px 16px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    text-align: center;
    transition: all 0.25s ease;
    background: #fff;
    height: 100%;
}

.role-option:hover .role-option-card {
    border-color: #adb5bd;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.role-option input[type="radio"]:checked + .role-option-card {
    border-color: var(--kajarbi-brand, #c9a227);
    background: rgba(201, 162, 39, 0.04);
    box-shadow: 0 4px 16px rgba(201, 162, 39, 0.15);
}

.role-option .role-icon {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f3f5;
    border-radius: 50%;
    margin-bottom: 16px;
    color: #495057;
    transition: all 0.25s ease;
}

.role-option input[type="radio"]:checked + .role-option-card .role-icon {
    background: var(--kajarbi-brand, #c9a227);
    color: #fff;
}

.role-option-card h3 {
    font-weight: 600;
    color: #212529;
    font-size: 16px;
    margin: 0 0 8px 0;
}

.role-option-card p {
    font-size: 13px;
    color: #6c757d;
    margin: 0;
    line-height: 1.5;
}

/* ================================================
   Phase 3: Account Setup Styles
   ================================================ */

.kajarbi-setup-box {
    max-width: 560px;
}

.kajarbi-setup-box .auth-header {
    margin-bottom: 28px;
}

/* File Upload Wrapper */
.file-upload-wrapper {
    position: relative;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    transition: all 0.2s ease;
    cursor: pointer;
    background: #fafbfc;
}

.file-upload-wrapper:hover {
    border-color: var(--kajarbi-brand, #c9a227);
    background: rgba(201, 162, 39, 0.02);
}

.file-upload-wrapper input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.file-upload-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: #6c757d;
}

.file-upload-info .dashicons {
    font-size: 32px;
    width: 32px;
    height: 32px;
    color: #adb5bd;
}

.file-upload-preview {
    display: none;
}

.file-upload-preview.has-file {
    display: block;
}

.file-upload-preview img {
    max-width: 100px;
    max-height: 100px;
    border-radius: 8px;
    margin-bottom: 8px;
}

/* Social Handles */
.social-handles {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.social-input {
    display: flex;
    align-items: center;
    gap: 0;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    overflow: hidden;
}

.social-input .social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    background: #e9ecef;
    color: #495057;
    flex-shrink: 0;
}

.social-input input {
    flex: 1;
    border: none !important;
    background: transparent !important;
    padding: 10px 12px !important;
    border-radius: 0 !important;
}

.social-input input:focus {
    box-shadow: none !important;
}

/* Skip Setup Link */
.skip-setup-link {
    color: #6c757d;
    font-size: 14px;
    text-decoration: none;
}

.skip-setup-link:hover {
    color: var(--kajarbi-brand, #c9a227);
    text-decoration: underline;
}

/* Text Alignment */
.text-center {
    text-align: center;
}

/* Select Dropdown */
.kajarbi-auth-form select {
    width: 100%;
    padding: 10px 14px;
    font-size: 15px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    background: #fff;
    color: #212529;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23495057' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.kajarbi-auth-form select:focus {
    outline: none;
    border-color: var(--kajarbi-brand, #c9a227);
    box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.12);
}

/* Responsive */
@media (max-width: 768px) {
    .role-selection-options {
        grid-template-columns: 1fr;
    }
    
    .kajarbi-role-selection-box,
    .kajarbi-setup-box {
        max-width: 100%;
    }
    
    .role-option-card {
        padding: 20px 16px;
    }
    
    .role-option .role-icon {
        width: 56px;
        height: 56px;
    }
}

/* Responsive */
@media (max-width: 576px) {
    .kajarbi-auth-box {
        padding: 28px 20px;
    }

    .auth-header h2 {
        font-size: 24px;
    }

    .user-type-options {
        grid-template-columns: 1fr;
    }

    .kajarbi-auth-form .form-row {
        flex-direction: column;
        gap: 0;
    }

    .kajarbi-auth-form .form-group.half {
        flex: none;
    }

    .register-options {
        flex-direction: column;
    }

    .register-options .btn {
        max-width: none;
    }
}
