/**
 * DONERO Onboarding Form Styles
 */

:root {
    --primary-color: #2c5aa0;
    --secondary-color: #f8f9fa;
    --text-color: #333;
    --border-color: #ddd;
    --error-color: #dc3545;
    --success-color: #28a745;
    --max-width: 800px;
    --spacing: 1.5rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f5f5f5;
    padding: 2rem 1rem;
}

.language-switcher {
    position: fixed;
    top: 1rem;
    right: 1rem;
    display: flex;
    gap: 0.5rem;
    z-index: 1000;
}

.language-switcher a {
    padding: 0.5rem 1rem;
    background: white;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    transition: all 0.3s;
}

.language-switcher a:hover,
.language-switcher a.active {
    background: var(--primary-color);
    color: white;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.logo-container {
    text-align: center;
    margin-bottom: 2rem;
}

.logo {
    max-width: 400px;
    height: auto;
}

h1 {
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
}

h2 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--secondary-color);
}

.form-section {
    margin-bottom: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

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

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 1rem;
    transition: border-color 0.3s;
    background-color: white;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
}

input[type="text"].error,
input[type="email"].error,
input[type="tel"].error,
input[type="number"].error,
select.error {
    border-color: var(--error-color);
}

input[type="checkbox"] {
    margin-right: 0.5rem;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.checkbox-group {
    margin-bottom: 1rem;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    cursor: pointer;
    font-weight: normal;
}

.checkbox-label span {
    flex: 1;
}

.checkbox-label a {
    color: var(--primary-color);
    text-decoration: underline;
}

.info-box {
    background: var(--secondary-color);
    padding: 1rem;
    border-radius: 4px;
    margin-top: 1rem;
}

.info-box p {
    margin-bottom: 0.5rem;
}

.total-fee {
    font-size: 1.1rem;
    color: var(--primary-color);
}

.error-message {
    display: block;
    color: var(--error-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
    min-height: 1.2rem;
}

.required-note {
    font-size: 0.875rem;
    color: #666;
    margin-top: 1rem;
}

.form-actions {
    text-align: center;
    margin-top: 2rem;
}

.submit-button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 1rem 3rem;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s;
}

.submit-button:hover:not(:disabled) {
    background: #1e4078;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.submit-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s;
}

.modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    animation: slideIn 0.3s;
}

.modal-content h2 {
    border: none;
    margin-bottom: 1rem;
}

.modal-content .close-button {
    margin-top: 1.5rem;
    padding: 0.75rem 2rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
}

/* Loading Spinner */
.loading-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

.loading-overlay.show {
    display: flex;
}

.loading-spinner {
    text-align: center;
    color: white;
}

.spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
    border: 6px solid rgba(255, 255, 255, 0.3);
    border-top: 6px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.loading-subtext {
    font-size: 0.9rem;
    opacity: 0.8;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

/* Responsive */
@media (max-width: 768px) {
    body {
        padding: 1rem 0.5rem;
    }
    
    .container {
        padding: 1.5rem;
    }
    
    h1 {
        font-size: 1.5rem;
    }
    
    h2 {
        font-size: 1.2rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .language-switcher {
        position: static;
        justify-content: center;
        margin-bottom: 1rem;
    }
    
    .submit-button {
        width: 100%;
        padding: 1rem;
    }
}

@media print {
    .language-switcher,
    .submit-button {
        display: none;
    }
}
