
/* Base Form Styles */
#importivity-native-form {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    max-width: 600px;
    margin: 0 auto;
}

.form-wrapper {
    padding: 20px 20px;
}

.form-content {
    position: relative;
}

.form-step {
    display: none;
}

.form-step.active {
    display: block;
    animation: fadeInSlide 0.4s ease-out;
}

/* Form Groups and Inputs */
.form-group {
    margin-bottom: 24px;
}

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

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 0;
    border: none;
    border-bottom: 1px solid #E5E7EB;
    font-size: 16px;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    box-sizing: border-box;
    background: transparent;
    color: #111827;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #9CA3AF;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-bottom-color: #111827;
    background: transparent;
}

.form-group input.error {
    border-bottom-color: #EF4444;
    animation: shake 0.3s ease-in-out;
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
    padding-top: 14px;
}

/* Phone Input with Country Code */
.phone-input-group {
    display: flex;
    gap: 12px;
    align-items: center;
    border-bottom: 1px solid #E5E7EB;
    padding-bottom: 14px;
    transition: border-color 0.3s ease;
}

.phone-input-group:focus-within {
    border-bottom-color: #111827;
}

.country-select {
    display: flex;
    align-items: center;
    gap: 8px;
    position: relative;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.country-select:hover {
    background-color: #F9FAFB;
}

.country-flag {
    width: 24px;
    height: 16px;
    object-fit: cover;
    border-radius: 2px;
}

.country-code-select {
    border: none;
    background: transparent;
    font-size: 15px;
    font-weight: 500;
    color: #111827;
    cursor: pointer;
    padding-right: 20px;
    appearance: none;
    outline: none;
}

.dropdown-arrow {
    position: absolute;
    right: 12px;
    pointer-events: none;
    color: #6B7280;
}

.phone-input-group input {
    border: none;
    border-bottom: none !important;
    flex: 1;
    padding: 8px 0;
    margin: 0;
}

/* Modern Option Cards */
.form-group-label {
    font-size: 15px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 16px;
}

.option-cards-modern {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 32px;
}

.option-card-modern {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    border: 2px solid #E5E7EB;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #FFFFFF;
}

.option-card-modern:hover {
    border-color: #D1D5DB;
    background: #F9FAFB;
}

.option-card-modern.selected {
    border-color: #111827;
    background: #F9FAFB;
}

.option-icon-modern {
    width: 48px;
    height: 48px;
    background: #F3F4F6;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all 0.2s ease;
}

.option-card-modern.selected .option-icon-modern {
    background: #111827;
    color: #FFFFFF;
}

.option-icon-modern svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
}

.option-content-modern {
    flex: 1;
    text-align: left;
}

.option-title-modern {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 4px;
}

.option-description-modern {
    font-size: 14px;
    color: #6B7280;
    line-height: 1.5;
}

/* Modern Buttons */
.btn-modern {
    width: 100%;
    padding: 16px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-primary.btn-modern {
    background: #111827;
    color: #FFFFFF;
}

.btn-primary.btn-modern:hover:not(:disabled) {
    background: #000000;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-primary.btn-modern:disabled {
    background: #D1D5DB;
    color: #9CA3AF;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary.btn-modern {
    background: #FFFFFF;
    color: #111827;
    border: 2px solid #E5E7EB;
}

.btn-secondary.btn-modern:hover {
    background: #F9FAFB;
    border-color: #D1D5DB;
}

.btn-link {
    background: none;
    border: none;
    color: #3B82F6;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    padding: 8px 0;
    margin-top: 12px;
    text-decoration: underline;
}

.btn-link:hover {
    color: #2563EB;
}

.button-group {
    display: flex;
    gap: 12px;
    margin-top: 32px;
}

.button-group .btn-secondary {
    flex: 0 0 auto;
    width: auto;
    min-width: 100px;
}

.button-group .btn-primary {
    flex: 1;
}

/* Verification Section */
.verification-section {
    text-align: center;
    padding: 32px 20px;
}

.verification-section h3 {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 12px;
}

.verification-section p {
    color: #6B7280;
    font-size: 15px;
    margin-bottom: 24px;
}

.verification-code-input {
    font-size: 32px !important;
    text-align: center;
    letter-spacing: 12px;
    font-weight: 700;
    max-width: 280px;
    margin: 0 auto 20px;
    padding: 16px !important;
    border: 2px solid #E5E7EB !important;
    border-radius: 12px !important;
    background: #F9FAFB !important;
}

.verification-code-input:focus {
    border-color: #111827 !important;
    background: #FFFFFF !important;
}

/* Status Messages */
.status-message {
    padding: 12px 16px;
    border-radius: 8px;
    margin: 16px 0;
    font-weight: 500;
    font-size: 14px;
    text-align: center;
    display: none;
    animation: slideDown 0.3s ease-out;
}

.status-message.success {
    background: #ECFDF5;
    color: #065F46;
    border: 1px solid #A7F3D0;
}

.status-message.error {
    background: #FEF2F2;
    color: #991B1B;
    border: 1px solid #FECACA;
}

/* Verified Email Display */
.verified-email-display {
    background: #ECFDF5;
    border: 1px solid #A7F3D0;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 24px;
    text-align: center;
    color: #065F46;
    font-weight: 600;
    font-size: 14px;
}

/* Success Screen */
.success-screen {
    text-align: center;
    padding: 60px 20px;
}

.success-icon {
    font-size: 64px;
    margin-bottom: 24px;
    animation: bounce 0.8s ease-in-out;
}

.success-screen h2 {
    font-size: 32px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 16px;
}

.success-screen p {
    font-size: 16px;
    color: #6B7280;
    line-height: 1.6;
    max-width: 500px;
    margin: 0 auto;
}

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

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

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-20px);
    }
    60% {
        transform: translateY(-10px);
    }
}

/* Loading State */
.btn.loading {
    position: relative;
    color: transparent;
}

.btn.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .form-wrapper {
        padding: 24px 16px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    .option-card-modern {
        padding: 16px;
    }
    
    .option-icon-modern {
        width: 40px;
        height: 40px;
    }
    
    .option-icon-modern svg {
        width: 20px;
        height: 20px;
    }
    
    .verification-code-input {
        font-size: 24px !important;
        letter-spacing: 8px;
    }
    
    .button-group {
        flex-direction: column-reverse;
    }
    
    .button-group .btn-secondary,
    .button-group .btn-primary {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .form-wrapper {
        padding: 20px 12px;
    }
    
    .success-screen h2 {
        font-size: 24px;
    }
    
    .success-icon {
        font-size: 48px;
    }
}

/* Accessibility */
.btn:focus {
    outline: 3px solid rgba(59, 130, 246, 0.5);
    outline-offset: 2px;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .form-group input,
    .form-group textarea {
        border-bottom-width: 2px;
    }
    
    .option-card-modern {
        border-width: 3px;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print Styles */
@media print {
    #importivity-native-form {
        box-shadow: none;
    }
    
    .btn-modern,
    .verification-section {
        display: none;
    }
    
    .form-step {
        display: block !important;
    }
}

/* Screen Reader Only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}