/* TeestoGo Login/Signup Styles */

/* Reset and Base Styles */
.teestogo-login-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background: white;
    min-height: 100vh;
    width: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

.login-signup-wrapper {
    background: white;
    border: 1px solid #e5e5e5;
    overflow: hidden;
    width: 100%;
    max-width: 400px;
    position: relative;
}

/* Form Sections */
.form-section {
    padding: 60px 40px;
    transition: all 0.3s ease;
}

.form-header {
    text-align: center;
    margin-bottom: 30px;
}

.form-header h2 {
    font-size: 32px;
    font-weight: 700;
    color: #000;
    margin: 0 0 12px 0;
}

.form-header p {
    color: #666;
    font-size: 16px;
    margin: 0;
}

/* Form Elements */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    position: relative;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #000;
    margin-bottom: 8px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"] {
    width: 100%;
    padding: 15px 20px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #0066cc;
    background: white;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.form-group input.error {
    border-color: #e53e3e;
    background: #fff5f5;
}

/* Password Input Wrapper */
.password-input-wrapper {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
    color: #718096;
    transition: color 0.3s ease;
}

.toggle-password:hover {
    color: #0066cc;
}

.eye-icon {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
}

/* Checkbox Styles */
.checkbox-group {
    margin-top: 10px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    color: #000;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    margin-right: 12px;
    position: relative;
    transition: all 0.3s ease;
    background: white;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: #0066cc;
    border-color: #0066cc;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

/* Button Styles */
.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.btn-primary {
    background: #0066cc;
    color: white;
}

.btn-primary:hover {
    background: #0052a3;
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-full {
    width: 100%;
}

.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Loading Spinner */
.spinner {
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Form Footer */
.form-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e5e5e5;
}

.form-footer p {
    color: #666;
    font-size: 14px;
    margin: 0;
}

.form-footer a {
    color: #0066cc;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.form-footer a:hover {
    color: #0052a3;
    text-decoration: underline;
}

/* Messages */
.auth-messages {
    position: fixed;
    top: 20px;
    right: 20px;
    max-width: 400px;
    z-index: 1000;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.message-content {
    background: white;
    border-radius: 12px;
    padding: 15px 20px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.auth-messages.success .message-content {
    border-left: 4px solid #48bb78;
}

.auth-messages.error .message-content {
    border-left: 4px solid #e53e3e;
}

.message-text {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
}

.message-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
}

.message-close:hover {
    color: #000;
}

/* Field Errors */
.field-error {
    color: #e53e3e;
    font-size: 12px;
    margin-top: 5px;
    font-weight: 500;
}

/* Password Strength Indicator */
.password-strength {
    margin-top: 10px;
}

.password-strength-bar {
    height: 4px;
    background: #e5e5e5;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.password-strength-text {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
    display: block;
}

/* Responsive Design */
@media (max-width: 768px) {
    .teestogo-login-container {
        padding: 0;
    }
    
    .login-signup-wrapper {
        max-width: 100%;
        border: none;
    }
    
    .form-section {
        padding: 30px 20px;
    }
    
    .form-header h2 {
        font-size: 24px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .auth-messages {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
}

@media (max-width: 480px) {
    .form-section {
        padding: 25px 15px;
    }
    
    .form-header h2 {
        font-size: 22px;
    }
    
    .form-group input[type="text"],
    .form-group input[type="email"],
    .form-group input[type="password"] {
        padding: 12px 15px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    .btn {
        padding: 12px 20px;
        font-size: 16px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for accessibility */
.form-group input:focus,
.btn:focus,
.toggle-password:focus,
.message-close:focus {
    outline: 2px solid #0066cc;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .teestogo-login-container {
        background: #000;
    }
    
    .login-signup-wrapper {
        border: 2px solid #fff;
    }
    
    .form-group input {
        border-color: #000;
    }
}

/* Print styles */
@media print {
    .teestogo-login-container {
        background: white;
    }
    
    .login-signup-wrapper {
        box-shadow: none;
        border: 1px solid #000;
    }
}
