/* Custom Registration Page Styles */

:root {
    --ayurveda-green: #4b7c59;
    --ayurveda-dark-green: #165029;
    --ayurveda-light-green: #8bc34a;
    --ayurveda-cream: #F0EAD6;
    --ayurveda-orange: #e76f2f;
}

/* Enhanced animations */
@keyframes float {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg); 
        opacity: 0.1;
    }
    25% { 
        transform: translateY(-10px) rotate(90deg); 
        opacity: 0.2;
    }
    50% { 
        transform: translateY(-20px) rotate(180deg); 
        opacity: 0.1;
    }
    75% { 
        transform: translateY(-10px) rotate(270deg); 
        opacity: 0.15;
    }
}

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

@keyframes fadeInScale {
    from {
        transform: scale(0.95);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Form animations */
.glass-effect {
    animation: fadeInScale 0.6s ease-out;
}

.input-group {
    animation: slideInUp 0.4s ease-out;
    animation-fill-mode: both;
}

.input-group:nth-child(1) { animation-delay: 0.1s; }
.input-group:nth-child(2) { animation-delay: 0.2s; }
.input-group:nth-child(3) { animation-delay: 0.3s; }

/* Enhanced input focus effects */
.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
    box-shadow: 0 0 0 3px rgba(75, 124, 89, 0.1);
    border-color: var(--ayurveda-green);
    transform: translateY(-1px);
}

/* File upload styling */
#aadhaar:focus + label {
    outline: 2px solid var(--ayurveda-green);
    outline-offset: 2px;
}

/* Custom radio and checkbox styling */
input[type="radio"], input[type="checkbox"] {
    accent-color: var(--ayurveda-green);
}

/* Enhanced button effects */
.submit-btn {
    position: relative;
    overflow: hidden;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.submit-btn:hover::before {
    left: 100%;
}

/* Loading state */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

.loading .submit-btn {
    background: #999;
}

/* Success state styling */
.success-state {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

/* Error state styling */
.error-state {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .glass-effect {
        margin: 1rem;
        padding: 1.5rem;
        border-radius: 1.5rem;
    }
    
    .particle {
        display: none; /* Hide particles on mobile for better performance */
    }
    
    .floating-label {
        font-size: 0.9rem;
    }
    
    .submit-btn {
        width: 100%;
        padding: 1rem;
    }
}

/* Print styles */
@media print {
    .floating-particles,
    .particle,
    header,
    footer {
        display: none;
    }
    
    .glass-effect {
        background: white;
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .glass-effect {
        background: white;
        border: 2px solid black;
    }
    
    .floating-label {
        color: black;
    }
    
    input:focus {
        border: 3px solid black;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .particle,
    .pulse-animation,
    .floating-particles {
        animation: none;
    }
    
    * {
        transition: none !important;
        animation: none !important;
    }
}

/* Dark mode support (future enhancement) */
@media (prefers-color-scheme: dark) {
    body {
        background: linear-gradient(135deg, #1a202c 0%, #2d3748 100%);
        color: white;
    }
    
    .glass-effect {
        background: rgba(45, 55, 72, 0.95);
        border-color: rgba(255, 255, 255, 0.1);
    }
    
    input, select, textarea {
        background: rgba(45, 55, 72, 0.8);
        border-color: rgba(255, 255, 255, 0.2);
        color: white;
    }
    
    .floating-label {
        color: #a0aec0;
    }
}

/* Accessibility improvements */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus indicators for better accessibility */
*:focus {
    outline: 2px solid var(--ayurveda-green);
    outline-offset: 2px;
}

/* Skip link for accessibility */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--ayurveda-green);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 6px;
}

/* Form validation styles */
.field-error {
    border-color: #ef4444 !important;
    background-color: #fef2f2 !important;
}

.error-message {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
}

.error-message svg {
    width: 1rem;
    height: 1rem;
    margin-right: 0.25rem;
}

.field-success {
    border-color: #10b981 !important;
    background-color: #f0fdf4 !important;
}

.success-message {
    color: #10b981;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: flex;
    align-items: center;
}

.success-message svg {
    width: 1rem;
    height: 1rem;
    margin-right: 0.25rem;
}

/* Loading spinner */
.spinner {
    border: 2px solid #f3f3f3;
    border-radius: 50%;
    border-top: 2px solid var(--ayurveda-green);
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-right: 0.5rem;
}

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

/* Progress bar */
.progress-bar {
    width: 100%;
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--ayurveda-green), var(--ayurveda-light-green));
    width: 0%;
    transition: width 0.3s ease;
}

/* Tooltip styles */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip .tooltiptext {
    visibility: hidden;
    width: 200px;
    background-color: var(--ayurveda-dark-green);
    color: white;
    text-align: center;
    border-radius: 6px;
    padding: 8px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 0.875rem;
}

.tooltip:hover .tooltiptext {
    visibility: visible;
    opacity: 1;
}

/* Modal styles for confirmation */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    background-color: white;
    margin: 15% auto;
    padding: 2rem;
    border-radius: 1rem;
    width: 90%;
    max-width: 500px;
    position: relative;
    animation: slideInUp 0.3s ease-out;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 1rem;
    top: 1rem;
}

.close:hover {
    color: var(--ayurveda-green);
}

/* Enhanced mobile responsiveness */
@media (max-width: 640px) {
    .grid.grid-cols-1.md\\:grid-cols-3 {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .grid.grid-cols-1.md\\:grid-cols-2 {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .text-4xl.md\\:text-5xl {
        font-size: 2.5rem !important;
    }
    
    .px-8.md\\:px-10 {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
}

/* Performance optimizations */
.gpu-accelerated {
    transform: translateZ(0);
    will-change: transform;
}

/* Content loading state */
.content-placeholder {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 2s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Multi-step form - hide group section */
.form-step ~ .group-section {
    display: none !important;
}

/* Multi-step Form Styles */
.form-step {
    display: block;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.form-step.hidden {
    display: none !important;
}

/* Ensure Step 1 is visible by default */
#step1 {
    /* display: block !important; */
}

/* Progress Indicator Styles */
.progress-container {
    background: linear-gradient(135deg, var(--ayurveda-cream) 0%, #ffffff 100%);
    border: 1px solid var(--ayurveda-light-green);
    border-radius: 1rem;
    padding: 2rem;
    margin-bottom: 2rem;
}

.progress-bar {
    background-color: #e5e7eb;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.progress-fill {
    background: linear-gradient(90deg, var(--ayurveda-green), var(--ayurveda-dark-green));
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
    width: 0%;
}

.progress-text {
    text-align: center;
    font-weight: 600;
    color: var(--ayurveda-dark-green);
    margin-bottom: 1.5rem;
}

.steps-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.step-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    position: relative;
}

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #e5e7eb;
    color: #6b7280;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
    cursor: pointer;
    z-index: 2;
    position: relative;
}

.step-circle.active {
    background-color: var(--ayurveda-green);
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.step-circle.completed {
    background-color: var(--ayurveda-dark-green);
    color: white;
}

.step-label {
    font-size: 12px;
    color: #6b7280;
    text-align: center;
    font-weight: 500;
}

.step-indicator.active .step-label {
    color: var(--ayurveda-green);
    font-weight: 600;
}

.step-indicator.completed .step-label {
    color: var(--ayurveda-dark-green);
}

/* Step connecting lines */
.step-indicator:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 20px;
    left: 50%;
    width: 100%;
    height: 2px;
    background-color: #e5e7eb;
    z-index: 1;
}

.step-indicator.completed:not(:last-child)::after {
    background-color: var(--ayurveda-green);
}

/* Step Navigation Buttons */
.step-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    min-width: 120px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.step-nav-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.step-nav-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

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

.step-nav-btn svg {
    transition: transform 0.3s ease;
}

.step-nav-btn:hover svg {
    transform: scale(1.1);
}

/* Specific button color overrides */
.step-nav-btn.bg-gray-300 {
    background-color: #d1d5db;
    color: #374151;
}

.step-nav-btn.bg-gray-300:hover {
    background-color: #9ca3af;
}

.step-nav-btn.bg-ayurveda-green {
    background-color: var(--ayurveda-green);
}

.step-nav-btn.bg-ayurveda-green:hover {
    background-color: var(--ayurveda-dark-green);
}

/* Step navigation container styling */
.form-step .flex.justify-between {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
}

/* Responsive navigation buttons */
@media (max-width: 640px) {
    .step-nav-btn {
        padding: 10px 20px;
        font-size: 14px;
        min-width: 100px;
    }
    
    .form-step .flex.justify-between {
        flex-direction: column;
        gap: 1rem;
    }
    
    .form-step .flex.justify-between .step-nav-btn {
        width: 100%;
        justify-content: center;
    }
}