/* assets/css/svr-styles.css */

/* Base styles */
.svr-registration-container {
    max-width: 500px;
    margin: 0 auto;
    padding: 30px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.svr-step {
    animation: fadeIn 0.3s ease-in-out;
}

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

.svr-form {
    margin: 0;
}

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

.svr-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.svr-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    box-sizing: border-box;
    background: #fff;
}

.svr-input:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

/* Phone number container styling */
.svr-phone-container {
    display: flex;
    gap: 10px;
    align-items: stretch;
}

/* Dropdown styling */
.svr-dropdown-wrapper {
    position: relative;
    flex: 0 0 auto;
    min-width: 120px;
    max-width: 220px;
}

.svr-country-select {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    font-size: 14px;
    padding: 12px;
    cursor: pointer;
    text-align: left;
    background-color: #fff;
}

.svr-country-select:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.svr-dropdown-arrow {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: #6b7280;
    transition: transform 0.2s ease;
}

.svr-country-select[aria-expanded="true"] .svr-dropdown-arrow {
    transform: rotate(180deg);
}

.svr-dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    min-width: 280px;
    background: white;
    border: 2px solid #e0e0e0;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 300px;
    z-index: 9999;
    display: none;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.svr-dropdown-header {
    padding: 12px 16px 8px;
    border-bottom: 1px solid #e5e7eb;
}

.svr-dropdown-header h6 {
    margin: 0;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

.svr-dropdown-search {
    padding: 8px 12px;
    border-bottom: 1px solid #e5e7eb;
}

.svr-search-container {
    position: relative;
}

.svr-search-icon {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px;
    height: 16px;
    color: #9ca3af;
}

.svr-search-container input {
    width: 100%;
    padding: 8px 8px 8px 32px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    background-color: #f9fafb;
}

.svr-search-container input:focus {
    outline: none;
    border-color: #4CAF50;
    background-color: #fff;
    box-shadow: 0 0 0 1px rgba(76, 175, 80, 0.1);
}

.svr-dropdown-options {
    max-height: 200px;
    overflow-y: auto;
    padding: 4px 0;
}

.svr-dropdown-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.svr-dropdown-option:hover {
    background-color: #f3f4f6;
}

.svr-dropdown-option.selected {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.svr-option-flag {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.svr-option-code {
    font-weight: 500;
    color: #374151;
    min-width: 40px;
}

.svr-option-name {
    color: #6b7280;
    font-size: 13px;
}

/* Hide options that don't match search */
.svr-dropdown-option.hidden {
    display: none;
}

/* Searchable dropdown hint */
.svr-searchable-hint {
    font-size: 12px;
    color: #666;
    font-style: italic;
    margin-top: 2px;
}

.svr-phone-input {
    flex: 1;
    min-width: 0;
}

.svr-input.svr-input-error {
    border-color: #f44336;
    background-color: #fff9f9;
}

.svr-code-input {
    font-size: 24px;
    text-align: center;
    letter-spacing: 10px;
    font-weight: bold;
    max-width: 150px;
    margin: 0 auto;
    display: block;
}

.svr-help-text {
    display: block;
    margin-top: 5px;
    font-size: 13px;
    color: #666;
}

.svr-button {
    width: 100%;
    padding: 14px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    display: inline-block;
    text-align: center;
}

.svr-button-primary {
    background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3);
}

.svr-button-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #45a049 0%, #3d8b40 100%);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.4);
    transform: translateY(-2px);
}

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

.svr-button-loader {
    display: inline-block;
}

.svr-button-loader::after {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-left: 8px;
    border: 2px solid #fff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.svr-verification-info {
    text-align: center;
    margin-bottom: 30px;
}

.svr-verification-info h3 {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 24px;
}

.svr-verification-info p {
    margin: 10px 0;
    color: #666;
    font-size: 16px;
}

#svr-phone-display {
    font-weight: bold;
    color: #4CAF50;
}

.svr-back-link {
    display: inline-block;
    color: #666;
    text-decoration: none;
    font-size: 14px;
    margin-top: 10px;
    transition: color 0.3s ease;
}

.svr-back-link:hover {
    color: #4CAF50;
    text-decoration: none;
}

.svr-message {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 15px;
    line-height: 1.5;
    animation: slideDown 0.3s ease;
}

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

.svr-message.svr-success {
    background: #e8f5e9;
    color: #2e7d32;
    border-left: 4px solid #4CAF50;
}

.svr-message.svr-error {
    background: #ffebee;
    color: #c62828;
    border-left: 4px solid #f44336;
}

/* Responsive Design */
@media (max-width: 600px) {
    .svr-registration-container {
        padding: 20px;
        border-radius: 0;
        box-shadow: none;
    }

    .svr-input {
        font-size: 16px; /* Prevent zoom on iOS */
    }

    .svr-button {
        padding: 16px 24px;
    }

    .svr-verification-info h3 {
        font-size: 20px;
    }

    .svr-verification-info p {
        font-size: 14px;
    }

    /* Phone container responsive adjustments */
    .svr-phone-container {
        flex-direction: column;
        gap: 8px;
    }

    .svr-dropdown-wrapper {
        max-width: none;
        width: 100%;
    }

    .svr-country-select {
        max-width: none;
        width: 100%;
    }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    .svr-registration-container {
        background: #1e1e1e;
        box-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
    }
    
    .svr-form-group label {
        color: #e0e0e0;
    }
    
    .svr-input {
        background: #2a2a2a;
        border-color: #444;
        color: #fff;
    }
    
    .svr-input:focus {
        border-color: #4CAF50;
        box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2);
    }
    
    .svr-verification-info h3 {
        color: #e0e0e0;
    }
    
    .svr-verification-info p {
        color: #b0b0b0;
    }
    
    .svr-back-link {
        color: #b0b0b0;
    }
    
    .svr-help-text {
        color: #999;
    }
}

/* Loading overlay (optional enhancement) */
.svr-loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    z-index: 9999;
}

.svr-loading-overlay .svr-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #4CAF50;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Theme-specific styles */

/* MODERN THEME (Default) - Clean gradients and rounded corners */
.svr-theme-modern {
    /* Uses existing styles as base */
}

/* MINIMAL THEME - Simple clean lines and subtle shadows */
.svr-theme-minimal {
    background: #fafafa;
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.svr-theme-minimal .svr-input {
    border: 1px solid #d1d1d1;
    border-radius: 4px;
    background: #fff;
    box-shadow: none;
    transition: border-color 0.2s ease;
}

.svr-theme-minimal .svr-input:focus {
    border-color: #666;
    box-shadow: 0 0 0 1px #666;
}

.svr-theme-minimal .svr-button-primary {
    background: #333;
    border-radius: 4px;
    box-shadow: none;
    font-weight: 500;
}

.svr-theme-minimal .svr-button-primary:hover:not(:disabled) {
    background: #555;
    box-shadow: none;
    transform: none;
}

.svr-theme-minimal .svr-form-group label {
    color: #555;
    font-weight: 500;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* CLASSIC THEME - Traditional form styling with borders */
.svr-theme-classic {
    background: #f8f8f8;
    border: 2px solid #ddd;
    border-radius: 0;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
    padding: 40px;
}

.svr-theme-classic .svr-input {
    border: 2px inset #ddd;
    border-radius: 0;
    background: #fff;
    box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.1);
    font-family: serif;
}

.svr-theme-classic .svr-input:focus {
    border-color: #888;
    box-shadow: inset 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.svr-theme-classic .svr-button-primary {
    background: linear-gradient(to bottom, #f0f0f0 0%, #d0d0d0 100%);
    color: #333;
    border: 2px outset #ddd;
    border-radius: 0;
    box-shadow: none;
    text-shadow: 0 1px 0 #fff;
    font-weight: bold;
}

.svr-theme-classic .svr-button-primary:hover:not(:disabled) {
    background: linear-gradient(to bottom, #e0e0e0 0%, #c0c0c0 100%);
    transform: none;
    box-shadow: none;
}

.svr-theme-classic .svr-button-primary:active {
    border: 2px inset #ddd;
}

.svr-theme-classic .svr-form-group label {
    color: #333;
    font-weight: bold;
    font-family: serif;
}

.svr-theme-classic .svr-verification-info h3 {
    font-family: serif;
    color: #333;
}

.svr-theme-classic .svr-back-link {
    color: #666;
    text-decoration: underline;
}

.svr-theme-classic .svr-back-link:hover {
    color: #333;
}

/* Responsive adjustments for themes */
@media (max-width: 600px) {
    .svr-theme-minimal {
        border-radius: 0;
        border-left: none;
        border-right: none;
    }

    .svr-theme-classic {
        padding: 20px;
    }
}