
/* Shop Authentication Styles */
:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --card-bg: rgba(255, 255, 255, 0.95);
    --card-text: #333;
    --input-bg: #f8f9fa;
    --input-border: #e9ecef;
    --input-focus-border: #667eea;
    --button-text: white;
    --link-color: #667eea;
    --alert-danger-bg: linear-gradient(135deg, #ff6b6b, #ee5a5a);
    --alert-success-bg: linear-gradient(135deg, #51cf66, #40c057);
    --divider-color: #e9ecef;
    --help-text-color: #6c757d;
    --checkbox-bg: #f8f9fa;
    --checkbox-border: #e9ecef;
    --checkbox-checked-bg: #667eea;
    --shadow: rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] {
    --primary-gradient: linear-gradient(135deg, #4a5568 0%, #2d3748 100%);
    --card-bg: rgba(45, 55, 72, 0.95);
    --card-text: #e2e8f0;
    --input-bg: #4a5568;
    --input-border: #718096;
    --input-focus-border: #667eea;
    --button-text: white;
    --link-color: #90cdf4;
    --alert-danger-bg: linear-gradient(135deg, #e53e3e, #c53030);
    --alert-success-bg: linear-gradient(135deg, #38a169, #2f855a);
    --divider-color: #4a5568;
    --help-text-color: #a0aec0;
    --checkbox-bg: #4a5568;
    --checkbox-border: #718096;
    --checkbox-checked-bg: #667eea;
    --shadow: rgba(0, 0, 0, 0.3);
}

.auth-container {
    min-height: 100vh;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.auth-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.auth-wrapper {
    width: 100%;
    max-width: 440px;
    position: relative;
    z-index: 1;
}

.register-wrapper {
    max-width: 520px;
}

.auth-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: 0 25px 50px var(--shadow);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    animation: fadeInUp 0.6s ease-out;
    color: var(--card-text);
    transition: all 0.3s ease;
}

/* Header Styles */
.auth-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    text-align: center;
    padding: 40px 30px 30px;
    position: relative;
}

.auth-logo {
    margin-bottom: 20px;
}

.auth-logo i {
    font-size: 4rem;
    opacity: 0.9;
    text-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.auth-title {
    font-size: 2rem;
    font-weight: 700;
    margin: 0 0 8px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.auth-subtitle {
    font-size: 1rem;
    opacity: 0.9;
    margin: 0;
    font-weight: 400;
}

/* Content Styles */
.auth-content {
    padding: 40px 30px;
}

/* Alert Styles */
.alert {
    border-radius: 12px;
    border: none;
    padding: 16px 20px;
    margin-bottom: 24px;
    font-weight: 500;
}

.alert-danger {
    background: linear-gradient(135deg, #ff6b6b, #ee5a5a);
    color: white;
}

.alert-success {
    background: linear-gradient(135deg, #51cf66, #40c057);
    color: white;
}

/* Social Login Styles */
.social-login-section {
    margin-bottom: 30px;
}

.social-title {
    text-align: center;
    color: #6c757d;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 16px 24px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    margin-bottom: 16px;
}

.google-btn {
    background: #ffffff;
    color: #333;
    border-color: #dadce0;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.google-btn:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    color: #333;
    text-decoration: none;
}

.social-btn i {
    margin-right: 12px;
    font-size: 1.2rem;
}

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

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e9ecef;
}

.divider-text {
    background: rgba(255, 255, 255, 0.95);
    padding: 0 20px;
    color: #6c757d;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Form Styles */
.auth-form {
    margin-bottom: 30px;
}

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

.form-group {
    margin-bottom: 24px;
    flex: 1;
}

.form-group.half-width {
    margin-bottom: 20px;
}

/* Mobile-specific form adjustments */
@media (max-width: 576px) {
    .form-group {
        margin-bottom: 20px;
    }
    
    .form-group.half-width {
        margin-bottom: 18px;
    }
    
    .form-row {
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .form-group {
        margin-bottom: 18px;
    }
    
    .form-group.half-width {
        margin-bottom: 16px;
    }
    
    .form-row {
        gap: 8px;
    }
}

.form-label {
    display: flex;
    align-items: center;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    font-size: 0.95rem;
}

.form-label i {
    margin-right: 8px;
    color: #667eea;
    width: 16px;
}

.input-wrapper {
    position: relative;
}

.auth-form input[type="text"],
.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form textarea {
    width: 100%;
    padding: 16px 20px;
    border: 2px solid var(--input-border);
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: var(--input-bg);
    box-sizing: border-box;
    font-family: inherit;
    color: var(--card-text);
}

.auth-form textarea {
    min-height: 80px;
    max-height: 120px;
    resize: vertical;
}

.auth-form input:focus,
.auth-form textarea:focus {
    outline: none;
    border-color: var(--input-focus-border);
    background: var(--input-bg);
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #6c757d;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: color 0.3s ease;
}

.password-toggle:hover {
    color: #667eea;
}

.error-message {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 8px;
    font-weight: 500;
}

.help-text {
    color: #6c757d;
    font-size: 0.8rem;
    margin-top: 6px;
    line-height: 1.4;
}

/* Form Options */
.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 16px;
}

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

.checkbox-input {
    margin-right: 8px;
    accent-color: #667eea;
    min-width: 16px;
    min-height: 16px;
}

.checkbox-label {
    font-size: 0.9rem;
    color: #6c757d;
    cursor: pointer;
    user-select: none;
}

/* Better touch targets for mobile */
@media (max-width: 768px) {
    .checkbox-input {
        min-width: 18px;
        min-height: 18px;
        margin-right: 10px;
    }
    
    .remember-me {
        padding: 8px 0;
    }
    
    .forgot-password {
        padding: 8px 0;
        display: inline-block;
    }
    
    .auth-link {
        padding: 4px 0;
        display: inline-block;
    }
    
    .terms-link {
        padding: 2px 0;
        display: inline-block;
    }
}

.forgot-password {
    color: #667eea;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: #5a6fd8;
    text-decoration: underline;
}

/* Terms Section */
.terms-section {
    margin-bottom: 25px;
}

.terms-checkbox {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    position: relative;
    padding-left: 32px;
    line-height: 1.5;
}

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

.checkmark {
    position: absolute;
    top: 2px;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.terms-checkbox:hover .checkmark {
    border-color: #667eea;
    background-color: #f0f2ff;
}

.terms-checkbox .checkbox-input:checked ~ .checkmark {
    background-color: #667eea;
    border-color: #667eea;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.terms-checkbox .checkbox-input:checked ~ .checkmark:after {
    display: block;
}

.terms-checkbox .checkmark:after {
    left: 6px;
    top: 2px;
    width: 6px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.terms-text {
    font-size: 0.85rem;
    color: #6c757d;
    line-height: 1.5;
}

.terms-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.terms-link:hover {
    color: #5a6fd8;
    text-decoration: underline;
}

/* Button Styles */
.auth-btn {
    width: 100%;
    padding: 16px 24px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-family: inherit;
}

.primary-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.auth-btn i {
    margin-right: 8px;
}

/* Footer Styles */
.auth-footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.auth-footer p {
    margin: 0;
    color: #6c757d;
    font-size: 0.95rem;
}

.auth-link {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.auth-link:hover {
    color: #5a6fd8;
    text-decoration: underline;
}

/* Step-by-step authentication styles */
.auth-step {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.user-info {
    display: flex;
    align-items: center;
    background: #f8f9fa;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 24px;
    border: 1px solid #e9ecef;
}

.user-avatar {
    margin-right: 12px;
    color: #667eea;
}

.user-avatar i {
    font-size: 2rem;
}

.user-details {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.user-email {
    font-weight: 600;
    color: #333;
    margin-bottom: 4px;
}

.change-link {
    color: #667eea;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.change-link:hover {
    color: #5a6fd8;
    text-decoration: underline;
}

.new-user-info,
.existing-user-info {
    text-align: center;
    margin-bottom: 30px;
    padding: 24px;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.new-user-info h3,
.existing-user-info h3 {
    color: #333;
    margin-bottom: 12px;
    font-size: 1.25rem;
    font-weight: 700;
}

.new-user-info p,
.existing-user-info p {
    color: #6c757d;
    margin: 0;
    line-height: 1.5;
}

.new-user-actions,
.existing-user-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 30px;
}

.secondary-btn {
    background: #f8f9fa;
    color: #6c757d;
    border: 2px solid #e9ecef;
}

.secondary-btn:hover {
    background: #e9ecef;
    color: #495057;
    border-color: #dee2e6;
    transform: translateY(-1px);
}

.email-confirmed {
    margin-bottom: 24px;
}

.email-display {
    display: flex;
    align-items: center;
    background: #e8f5e8;
    border: 1px solid #c3e6c3;
    border-radius: 12px;
    padding: 12px 16px;
    color: #155724;
}

.email-display i {
    margin-right: 12px;
    color: #28a745;
    font-size: 1.2rem;
}

.email-display span {
    flex: 1;
    font-weight: 600;
}

/* Mobile optimizations for steps */
@media (max-width: 576px) {
    .user-info {
        padding: 12px;
    }
    
    .user-avatar i {
        font-size: 1.5rem;
    }
    
    .new-user-info,
    .existing-user-info {
        padding: 20px 16px;
        margin-bottom: 24px;
    }
    
    .new-user-actions,
    .existing-user-actions {
        margin-bottom: 24px;
    }
    
    .email-display {
        padding: 10px 12px;
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }
    
    .email-display i {
        margin-bottom: 8px;
        margin-right: 0;
    }
    
    .change-link {
        margin-top: 4px;
        align-self: flex-start;
    }
}

@media (max-width: 480px) {
    .new-user-info h3,
    .existing-user-info h3 {
        font-size: 1.1rem;
    }
    
    .new-user-info,
    .existing-user-info {
        padding: 16px 12px;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.auth-step {
    animation: slideIn 0.4s ease-out;
}

/* Responsive Design */

/* Large screens (1200px and up) */
@media (min-width: 1200px) {
    .auth-container {
        padding: 40px;
    }
    
    .auth-wrapper {
        max-width: 500px;
    }
    
    .register-wrapper {
        max-width: 580px;
    }
}

/* Medium to large tablets (992px to 1199px) */
@media (max-width: 1199px) and (min-width: 992px) {
    .auth-container {
        padding: 30px;
    }
    
    .auth-wrapper {
        max-width: 480px;
    }
    
    .register-wrapper {
        max-width: 560px;
    }
}

/* Small tablets (768px to 991px) */
@media (max-width: 991px) and (min-width: 768px) {
    .auth-container {
        padding: 25px;
    }
    
    .auth-wrapper,
    .register-wrapper {
        max-width: 90%;
    }
    
    .auth-header {
        padding: 35px 25px 30px;
    }
    
    .auth-content {
        padding: 35px 25px;
    }
}

/* Large mobile devices and small tablets (576px to 767px) */
@media (max-width: 767px) and (min-width: 576px) {
    .auth-container {
        padding: 20px;
        min-height: 100vh;
    }
    
    .auth-wrapper,
    .register-wrapper {
        max-width: 100%;
    }
    
    .auth-header {
        padding: 30px 20px 25px;
    }
    
    .auth-title {
        font-size: 1.75rem;
    }
    
    .auth-subtitle {
        font-size: 0.9rem;
    }
    
    .auth-content {
        padding: 30px 20px;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .form-options {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .social-btn,
    .auth-btn {
        padding: 15px 22px;
        font-size: 0.95rem;
    }
    
    .auth-form input,
    .auth-form textarea {
        padding: 15px 18px;
        font-size: 0.95rem;
    }
}

/* Small mobile devices (481px to 575px) */
@media (max-width: 575px) and (min-width: 481px) {
    .auth-container {
        padding: 15px;
        min-height: 100vh;
    }
    
    .auth-header {
        padding: 25px 18px 20px;
    }
    
    .auth-logo i {
        font-size: 3.2rem;
    }
    
    .auth-title {
        font-size: 1.6rem;
    }
    
    .auth-subtitle {
        font-size: 0.85rem;
    }
    
    .auth-content {
        padding: 25px 18px;
    }
    
    .social-btn,
    .auth-btn {
        padding: 14px 20px;
        font-size: 0.9rem;
    }
    
    .auth-form input,
    .auth-form textarea {
        padding: 14px 16px;
        font-size: 0.9rem;
    }
    
    .form-label {
        font-size: 0.85rem;
    }
    
    .terms-text {
        font-size: 0.8rem;
    }
    
    .divider-text {
        padding: 0 18px;
        font-size: 0.85rem;
    }
}

/* Extra small mobile devices (320px to 480px) */
@media (max-width: 480px) {
    .auth-container {
        padding: 10px;
        min-height: 100vh;
    }
    
    .auth-card {
        border-radius: 16px;
        margin: 0;
    }
    
    .auth-header {
        padding: 20px 15px 18px;
        border-radius: 16px 16px 0 0;
    }
    
    .auth-logo i {
        font-size: 2.8rem;
    }
    
    .auth-title {
        font-size: 1.4rem;
        margin-bottom: 6px;
    }
    
    .auth-subtitle {
        font-size: 0.8rem;
    }
    
    .auth-content {
        padding: 20px 15px;
    }
    
    .social-btn,
    .auth-btn {
        padding: 12px 18px;
        font-size: 0.85rem;
        border-radius: 10px;
    }
    
    .auth-form input,
    .auth-form textarea {
        padding: 12px 14px;
        font-size: 0.85rem;
        border-radius: 10px;
    }
    
    .form-label {
        font-size: 0.8rem;
        margin-bottom: 6px;
    }
    
    .form-label i {
        width: 14px;
        margin-right: 6px;
    }
    
    .terms-text {
        font-size: 0.75rem;
        line-height: 1.4;
    }
    
    .divider-text {
        padding: 0 15px;
        font-size: 0.8rem;
    }
    
    .alert {
        padding: 12px 16px;
        font-size: 0.85rem;
        border-radius: 10px;
    }
    
    .error-message {
        font-size: 0.75rem;
    }
    
    .help-text {
        font-size: 0.7rem;
    }
    
    .password-toggle {
        right: 12px;
        padding: 2px;
    }
    
    .password-toggle i {
        font-size: 0.9rem;
    }
}

/* Very small screens (below 360px) */
@media (max-width: 359px) {
    .auth-container {
        padding: 8px;
    }
    
    .auth-header {
        padding: 18px 12px 15px;
    }
    
    .auth-logo i {
        font-size: 2.5rem;
    }
    
    .auth-title {
        font-size: 1.25rem;
    }
    
    .auth-content {
        padding: 18px 12px;
    }
    
    .social-btn,
    .auth-btn {
        padding: 11px 16px;
        font-size: 0.8rem;
    }
    
    .auth-form input,
    .auth-form textarea {
        padding: 11px 13px;
        font-size: 0.8rem;
    }
    
    .form-label {
        font-size: 0.75rem;
    }
    
    .terms-checkbox {
        padding-left: 26px;
    }
    
    .checkmark {
        height: 16px;
        width: 16px;
        top: 1px;
    }
    
    .checkmark:after {
        left: 5px;
        top: 1px;
        width: 5px;
        height: 8px;
    }
    
    .divider-text {
        padding: 0 12px;
        font-size: 0.75rem;
    }
    
    .terms-text {
        font-size: 0.7rem;
    }
}

/* Landscape orientation adjustments for mobile */
@media (max-height: 600px) and (orientation: landscape) {
    .auth-container {
        padding: 10px;
        align-items: flex-start;
        padding-top: 20px;
    }
    
    .auth-header {
        padding: 15px 20px 12px;
    }
    
    .auth-logo i {
        font-size: 2rem;
    }
    
    .auth-title {
        font-size: 1.25rem;
    }
    
    .auth-subtitle {
        font-size: 0.8rem;
    }
    
    .auth-content {
        padding: 20px;
    }
    
    .form-group {
        margin-bottom: 16px;
    }
    
    .form-group.half-width {
        margin-bottom: 14px;
    }
}
