/* CSS for Auth Modal and Buttons */

/* Header Auth Button */
#authBtn {
    margin-left: 0.5rem;
    font-weight: 600;
}

#authBtn.logged-in {
    background-color: var(--primary-light);
    color: var(--primary-color);
}

/* Auth Modal Overlay */
.auth-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.auth-modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Auth Modal Config */
.auth-modal {
    background-color: var(--bg-secondary);
    width: 100%;
    max-width: 400px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    padding: 2rem;
    position: relative;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
    border: 1px solid var(--border-color);
}

.auth-modal-overlay.active .auth-modal {
    transform: translateY(0);
}

/* Close Button */
.auth-close-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-tertiary);
    transition: color 0.2s;
}

.auth-close-btn:hover {
    color: var(--text-primary);
}

/* Modal Content */
.auth-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-align: center;
    color: var(--text-primary);
}

.auth-subtitle {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

/* Form Styles */
.auth-form-group {
    margin-bottom: 1.25rem;
}

.auth-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.auth-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.2s;
}

.auth-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.auth-submit-btn {
    width: 100%;
    padding: 0.85rem;
    border-radius: 8px;
    border: none;
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 1rem;
}

.auth-submit-btn:hover {
    background-color: var(--primary-dark);
}

.auth-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

/* Footer & Toggle */
.auth-footer {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.auth-toggle-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    margin-left: 0.25rem;
}

.auth-toggle-btn:hover {
    text-decoration: underline;
}

/* Error Message */
.auth-error {
    background-color: #fee2e2;
    color: #ef4444;
    padding: 0.75rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    display: none;
    border: 1px solid #fecaca;
}

/* Dark Mode Adjustments if needed (using variables handles most) */
[data-theme="dark"] .auth-error {
    background-color: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.2);
}

/* Welcome Banner for Signup */
.auth-welcome-banner {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: 500;
}

.auth-welcome-banner .welcome-emoji {
    font-size: 1.5rem;
    margin-right: 0.5rem;
}

/* Signup Mode Styling */
.auth-modal.signup-mode {
    border-top: 4px solid #667eea;
}

.auth-modal.signup-mode .auth-submit-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.auth-modal.signup-mode .auth-submit-btn:hover {
    background: linear-gradient(135deg, #5a6fd6 0%, #6a4190 100%);
}

/* Social Login Buttons */
.auth-social-buttons {
    margin-bottom: 1.25rem;
}

.auth-social-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.auth-social-btn:hover {
    background-color: var(--bg-secondary);
    border-color: var(--primary-color);
}

.google-btn .google-icon {
    flex-shrink: 0;
}

/* Auth Divider */
.auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 1.25rem 0;
    color: var(--text-tertiary);
    font-size: 0.85rem;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid var(--border-color);
}

.auth-divider span {
    padding: 0 1rem;
}

/* Privacy Consent Checkbox */
.privacy-consent-group {
    margin-top: 1rem;
}

.privacy-consent-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.privacy-consent-checkbox {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    flex-shrink: 0;
    cursor: pointer;
    accent-color: var(--primary-color);
}

.privacy-consent-text {
    flex: 1;
}

.privacy-policy-link {
    color: var(--primary-color);
    text-decoration: none;
    margin-left: 0.25rem;
}

.privacy-policy-link:hover {
    text-decoration: underline;
}

/* Success Message */
.auth-success {
    background-color: #d1fae5;
    color: #059669;
    padding: 0.75rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    border: 1px solid #a7f3d0;
}

[data-theme="dark"] .auth-success {
    background-color: rgba(5, 150, 105, 0.1);
    border-color: rgba(5, 150, 105, 0.2);
}

/* My Page Modal */
.mypage-modal {
    max-width: 450px;
    max-height: 90vh;
    overflow-y: auto;
}

.mypage-section {
    padding: 1.25rem;
    margin-bottom: 1rem;
    background-color: var(--bg-primary);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.mypage-section-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.mypage-section-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.mypage-info-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.mypage-info-row:last-child {
    border-bottom: none;
}

.mypage-info-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.mypage-info-value {
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 500;
}

/* My Page Buttons */
.mypage-btn {
    width: 100%;
    padding: 0.7rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.mypage-btn-secondary {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border-color: var(--border-color);
}

.mypage-btn-secondary:hover {
    background-color: var(--bg-tertiary);
}

.mypage-btn-outline {
    background-color: transparent;
    color: var(--text-secondary);
    border-color: var(--border-color);
}

.mypage-btn-outline:hover {
    background-color: var(--bg-primary);
}

.mypage-btn-danger {
    background-color: #fee2e2;
    color: #dc2626;
    border-color: #fecaca;
}

.mypage-btn-danger:hover {
    background-color: #fecaca;
}

[data-theme="dark"] .mypage-btn-danger {
    background-color: rgba(220, 38, 38, 0.1);
    border-color: rgba(220, 38, 38, 0.2);
}

/* Danger Section */
.mypage-danger-section {
    border-color: #fecaca;
}

[data-theme="dark"] .mypage-danger-section {
    border-color: rgba(220, 38, 38, 0.3);
}

.mypage-warning-text {
    color: #dc2626;
}

.mypage-footer {
    margin-top: 1.5rem;
}

/* Toggle Switch */
.mypage-toggle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
}

.mypage-toggle-label {
    font-size: 0.9rem;
    color: var(--text-primary);
}

.mypage-toggle-switch {
    position: relative;
    width: 50px;
    height: 26px;
    flex-shrink: 0;
}

.mypage-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.mypage-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 26px;
}

.mypage-toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.mypage-toggle-switch input:checked+.mypage-toggle-slider {
    background-color: var(--primary-color);
}

.mypage-toggle-switch input:checked+.mypage-toggle-slider:before {
    transform: translateX(24px);
}

.mypage-consent-status {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    padding: 0.5rem;
    background-color: var(--bg-tertiary);
    border-radius: 4px;
}

.mypage-consent-status.active {
    color: #059669;
    background-color: rgba(5, 150, 105, 0.1);
}

.mypage-consent-status.inactive {
    color: #dc2626;
    background-color: rgba(220, 38, 38, 0.1);
}