/* Minimal KYC Form Styles */

.validation-message {
    font-size: 12px;
    font-weight: 500;
    margin-top: 5px;
    padding: 8px 12px;
    border-radius: 6px;
    background-color: #fef2f2;
    border: 1px solid #fecaca;
}

/* Prevent background scroll when popup is open */
body.popup-open {
    overflow: hidden;
    height: 100vh;
}

.popup {
    overflow-y: auto;
}

.kyc-wrapper {
    background: #ffffff;
    min-height: 100vh;
    padding: 20px;
    font-family: 'Bricolage Grotesque', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.kyc-card {
    background: white;
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    max-width: 100%;
    margin-top: 120px !important;
    margin-bottom: 40px;
    margin-left: auto;
    margin-right: auto;
}

.logo {
    max-height: 60px;
    width: auto;
    background: transparent;
}

.title {
    color: #6b7280;
    font-weight: 400;
    font-size: 1.3rem;
    margin-bottom: 30px;
    text-align: center;
}

.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-group label {
    display: block;
    color: #131c2d;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    padding-left: 4px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 16px 16px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    font-size: 16px;
    background: #f9f9f9;
    transition: all 0.3s ease;
    box-sizing: border-box;
    color: #131c2d;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    background: #ffffff;
    border-color: #d1d5db;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.05);
}

.form-group input::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

.form-row .form-group {
    margin-bottom: 0;
}

.form-row input {
    width: 100%;
    padding: 16px 16px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    font-size: 16px;
    background: #f9f9f9;
    transition: all 0.3s ease;
    box-sizing: border-box;
    color: #131c2d;
}

.form-row input:focus {
    outline: none;
    background: #ffffff;
    border-color: #d1d5db;
    box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.05);
}

.submit-btn {
    width: 100%;
    padding: 16px;
    background: #2f4059;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    margin-top: 20px;
}

.submit-btn:hover:not(:disabled) {
    background: #1f2937;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(47, 64, 89, 0.3);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-loader {
    display: flex;
    justify-content: center;
    align-items: center;
}

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

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

/* Modern Card Popup Styles */
.popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(19, 28, 45, 0.6);
    backdrop-filter: blur(4px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.popup-card {
    background: white;
    border-radius: 20px;
    width: 90%;
    max-width: 400px;
    margin: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    animation: slideUp 0.4s ease;
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px 16px;
    border-bottom: 1px solid #f1f3f4;
}

.popup-logo {
    height: 32px;
    width: auto;
    background: transparent;
}

.popup-close {
    background: none !important;
    border: none !important;
    font-size: 24px;
    color: #9ca3af !important;
    cursor: pointer;
    padding: 4px !important;
    line-height: 1;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.popup-close:hover {
    background: #f3f4f6 !important;
    color: #6b7280 !important;
}

.popup-body {
    padding: 24px;
    text-align: center;
}

.popup-icon-container {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.popup-icon {
    font-size: 28px;
    font-weight: bold;
}

.popup-icon-container.success {
    background: #dcfce7;
}

.popup-icon-container.error {
    background: #fef2f2;
}

.popup-icon.success {
    color: #16a34a;
}

.popup-icon.error {
    color: #dc2626;
}

.popup-title {
    font-size: 18px;
    font-weight: 600;
    color: #131c2d;
    margin: 0 0 8px;
    line-height: 1.3;
}

.popup-message {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
    line-height: 1.5;
}

.popup-footer {
    padding: 16px 24px 24px;
}

.popup-btn {
    width: 100%;
    padding: 12px 24px;
    background: #131c2d !important;
    color: white !important;
    border: none !important;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-transform: none;
}

.popup-btn:hover {
    background: #2f4059 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(19, 28, 45, 0.3) !important;
}

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

@keyframes slideUp {
    from { 
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Legacy selectors for compatibility */
.success-icon { color: #16a34a; }
.error-icon { color: #dc2626; }

/* Select Styling */
select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 4 5'%3E%3Cpath fill='%236c757d' d='M2 0L0 2h4zm0 5L0 3h4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    background-size: 12px;
    padding-right: 45px !important;
}

select:disabled {
    background-color: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
    border-color: #e5e7eb;
}

select:disabled option {
    color: #9ca3af;
}

/* Responsive Design */
@media (max-width: 768px) {
    .kyc-wrapper {
        padding: 15px;
    }
    
    .kyc-card {
        padding: 30px 25px;
        margin-top: 100px !important;
        margin-bottom: 40px;
        margin-left: auto;
        margin-right: auto;
        border-radius: 12px;
    }
    
    .title {
        font-size: 1.5rem;
        margin-bottom: 25px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .logo {
        max-height: 50px;
    }
}

@media (max-width: 480px) {
    .kyc-wrapper {
        padding: 10px;
    }
    
    .kyc-card {
        padding: 25px 20px;
        margin-top: 90px !important;
        margin-bottom: 40px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .form-group input,
    .form-group select,
    .form-row input {
        padding: 14px 16px;
        font-size: 16px;
    }
    
    .submit-btn {
        padding: 16px;
        font-size: 16px;
    }
    
    .popup-content {
        padding: 30px 20px;
        margin: 15px;
    }
}

/* Animation */
.kyc-card {
    animation: fadeInUp 0.6s ease-out;
}

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

/* Privacy Section */
.privacy-section {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    margin: 25px 0;
}

.privacy-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 10px;
}

.privacy-checkbox input[type="checkbox"] {
    margin: 0;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 2px;
}

.privacy-label {
    font-size: 14px;
    color: #131c2d;
    line-height: 1.5;
    margin: 0;
    cursor: pointer;
}

.privacy-link {
    color: #2f4059;
    text-decoration: underline;
    font-weight: 500;
}

.privacy-link:hover {
    color: #1f2937;
    text-decoration: none;
}

.privacy-note {
    font-size: 12px;
    color: #131c2d;
    margin: 0;
    font-style: italic;
    margin-left: 30px;
    opacity: 0.7;
}

.submit-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
}

/* Form validation */
input:invalid:not(:placeholder-shown) {
    border-color: #dc3545;
}

input:valid:not(:placeholder-shown) {
    border-color: #28a745;
}