/**
 * Punesim.com - Authentication Pages Styles
 */

/* Base Variables */
:root {
    /* Mobile Variables */
    --mobile-padding: 16px;
    --mobile-line-height: 1.5;
    --mobile-touch-target: 44px;
    --mobile-section-padding: 24px;
    --mobile-input-height: 48px;

    /* Desktop Variables */
    --desktop-padding: 24px;
    --desktop-line-height: 1.6;
    --desktop-section-padding: 40px;
    --desktop-input-height: 52px;
}

/* Auth Section - Base Styles */
.auth-section {
    padding: var(--mobile-section-padding) var(--mobile-padding);
    background-color: var(--gray-light);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-container {
    background-color: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
}

.auth-content {
    padding: var(--mobile-section-padding);
}

.auth-image {
    display: none;
    background-color: var(--primary-very-light);
}

.auth-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

.auth-title {
    font-size: var(--mobile-font-size-2xl);
    font-weight: 700;
    margin-bottom: 8px;
    color: var(--text-color);
    line-height: 1.3;
}

.auth-subtitle {
    color: var(--text-light);
    font-size: var(--mobile-font-size-base);
    line-height: var(--mobile-line-height);
}

/* Social Login Buttons */
.auth-social {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px;
    border-radius: var(--border-radius);
    border: 1px solid var(--gray-dark);
    background-color: var(--white);
    color: var(--text-color);
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    min-height: var(--mobile-touch-target);
    font-size: var(--mobile-font-size-base);
}

.google-btn:hover {
    background-color: #f2f2f2;
}

.facebook-btn {
    background-color: #4267B2;
    color: var(--white);
    border-color: #4267B2;
}

.facebook-btn:hover {
    background-color: #365899;
}

/* Divider */
.auth-divider {
    position: relative;
    text-align: center;
    margin: 20px 0;
}

.auth-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background-color: var(--gray);
    z-index: 1;
}

.auth-divider span {
    position: relative;
    background-color: var(--white);
    padding: 0 12px;
    color: var(--text-light);
    font-size: var(--mobile-font-size-base);
    z-index: 2;
}

/* Auth Form */
.auth-form {
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: var(--text-color);
    font-size: var(--mobile-font-size-base);
}

.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-group i {
    position: absolute;
    left: 12px;
    color: var(--text-light);
    font-size: var(--mobile-font-size-lg);
}

.input-group input {
    width: 100%;
    height: var(--mobile-input-height);
    padding: 0 12px 0 40px;
    border: 1px solid var(--gray-dark);
    border-radius: var(--border-radius);
    font-family: inherit;
    font-size: var(--mobile-font-size-base);
    -webkit-appearance: none;
    appearance: none;
}

.input-group input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(20, 55, 147, 0.2);
}

.toggle-password {
    position: absolute;
    right: 40px;
    top: 35%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 8px;
    font-size: var(--mobile-font-size-lg);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.remember-me {
    display: flex;
    align-items: center;
    gap: 8px;
}

.remember-me input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-color);
}

.remember-me label {
    font-size: var(--mobile-font-size-base);
}

.forgot-password {
    color: var(--primary-color);
    font-size: var(--mobile-font-size-base);
    text-decoration: none;
    padding: 8px;
}

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

.btn-block {
    width: 100%;
    text-align: center;
    min-height: var(--mobile-touch-target);
    font-size: var(--mobile-font-size-base);
}

/* Auth Footer */
.auth-footer,
.auth-employer {
    text-align: center;
    margin-top: 16px;
    color: var(--text-light);
    font-size: var(--mobile-font-size-base);
}

.auth-footer a,
.auth-employer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    padding: 8px;
}

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

.auth-employer {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--gray);
}

/* Registration Form Specific */
.user-type-options {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.user-type-option {
    border: 1px solid var(--gray-dark);
    border-radius: var(--border-radius);
    padding: 16px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    min-height: var(--mobile-touch-target);
}

.user-type-option:hover {
    border-color: var(--primary-color);
}

.user-type-option.active {
    border-color: var(--primary-color);
    background-color: var(--primary-very-light);
}

.user-type-option i {
    font-size: var(--mobile-font-size-xl);
    color: var(--primary-color);
    margin-bottom: 8px;
}

.user-type-option h3 {
    font-size: var(--mobile-font-size-base);
    font-weight: 600;
    margin-bottom: 4px;
}

.user-type-option p {
    font-size: var(--mobile-font-size-sm);
    color: var(--text-light);
    line-height: var(--mobile-line-height);
}

.user-type-option input[type="radio"] {
    display: none;
}

.form-row {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 16px;
}

.terms-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 16px;
}

.terms-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--primary-color);
}

.terms-checkbox label {
    font-size: var(--mobile-font-size-base);
    color: var(--text-light);
    line-height: var(--mobile-line-height);
}

.terms-checkbox a {
    color: var(--primary-color);
    text-decoration: none;
    padding: 4px;
}

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

/* Mobile Optimizations */
@media (max-width: 767px) {

    /* Reset and Base Styles */
    * {
        -webkit-tap-highlight-color: transparent;
        -webkit-touch-callout: none;
    }

    html {
        -webkit-text-size-adjust: 100%;
        -webkit-font-smoothing: antialiased;
    }

    body {
        overflow-x: hidden;
        position: relative;
    }

    /* Form Optimizations */
    .input-group input {
        -webkit-appearance: none;
        appearance: none;
        border-radius: var(--border-radius);
    }

    /* Touch-friendly adjustments */
    .social-btn,
    .user-type-option,
    .btn-block {
        touch-action: manipulation;
    }

    /* Performance optimizations */
    .user-type-option,
    .social-btn {
        will-change: transform;
        backface-visibility: hidden;
        transform: translateZ(0);
    }

    /* Accessibility improvements */
    .social-btn:focus,
    .user-type-option:focus,
    .input-group input:focus,
    .btn-block:focus {
        outline: 2px solid var(--primary-color);
        outline-offset: 2px;
    }

    /* Text overflow prevention */
    .auth-title,
    .auth-subtitle,
    .user-type-option h3,
    .user-type-option p,
    .terms-checkbox label {
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }
}

/* Desktop Optimizations */
@media (min-width: 768px) {
    .auth-section {
        padding: var(--desktop-section-padding) var(--desktop-padding);
    }

    .auth-container {
        max-width: 800px;
        display: flex;
        flex-direction: row;
    }

    .auth-content {
        padding: var(--desktop-section-padding);
        flex: 1;
    }

    .auth-image {
        display: flex;
        flex: 1;
        padding: 0;
    }

    .auth-title {
        font-size: var(--desktop-font-size-2xl);
    }

    .auth-subtitle {
        font-size: var(--desktop-font-size-base);
    }

    .form-group label {
        font-size: var(--desktop-font-size-base);
    }

    .input-group input {
        height: var(--desktop-input-height);
        font-size: var(--desktop-font-size-base);
    }

    .input-group i {
        font-size: var(--desktop-font-size-lg);
    }

    .toggle-password {
        font-size: var(--desktop-font-size-lg);
    }

    .social-btn {
        font-size: var(--desktop-font-size-base);
    }

    .auth-divider span {
        font-size: var(--desktop-font-size-base);
    }

    .remember-me label,
    .forgot-password,
    .btn-block,
    .auth-footer,
    .auth-employer {
        font-size: var(--desktop-font-size-base);
    }

    .user-type-options {
        flex-direction: row;
    }

    .user-type-option {
        flex: 1;
    }

    .user-type-option h3 {
        font-size: var(--desktop-font-size-base);
    }

    .user-type-option p {
        font-size: var(--desktop-font-size-sm);
    }

    .form-row {
        flex-direction: row;
    }

    .form-row .form-group {
        flex: 1;
    }

    .terms-checkbox label {
        font-size: var(--desktop-font-size-base);
    }
}

.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 5px;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: slideIn 0.3s ease-out;
    font-size: var(--mobile-font-size-base);
}

.notification.success {
    background-color: #28a745;
    color: #fff;
}

.notification.error {
    background-color: #dc3545;
    color: #fff;
}

.notification.info {
    background-color: #17a2b8;
    color: #fff;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.login-error-message {
    background-color: #dc3545;
    color: #fff;
    padding: 12px 15px;
    border-radius: 5px;
    margin-bottom: 20px;
    font-size: var(--mobile-font-size-base);
    font-weight: 500;
    text-align: center;
    display: none;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}