/* ELAV8 Survey Specific Styles */

/* Additional shimmer effects for interactive elements */
.form-group {
    position: relative;
    overflow: hidden;
}

.form-group::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(0, 255, 247, 0.1),
        transparent
    );
    transition: left 0.6s ease;
    pointer-events: none;
}

.form-group:hover::before {
    left: 100%;
}

/* Enhanced input focus effects */
input[type="text"]:focus,
input[type="email"]:focus,
select:focus,
textarea:focus {
    position: relative;
    z-index: 2;
}

input[type="text"]:focus::after,
input[type="email"]:focus::after,
select:focus::after,
textarea:focus::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        45deg,
        transparent,
        rgba(0, 255, 247, 0.1),
        transparent
    );
    animation: input-shimmer 1s ease-in-out infinite;
    pointer-events: none;
}

@keyframes input-shimmer {
    0%, 100% {
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
}

/* Enhanced checkbox and radio animations */
.checkbox-label,
.radio-label {
    position: relative;
    overflow: hidden;
}

.checkbox-label::before,
.radio-label::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(0, 255, 247, 0.2),
        transparent
    );
    transition: left 0.5s ease;
    pointer-events: none;
}

.checkbox-label:hover::before,
.radio-label:hover::before {
    left: 100%;
}

/* Progress bar enhancements */
.progress-fill {
    position: relative;
    overflow: hidden;
}

.progress-fill::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.3) 50%,
        transparent 70%
    );
    animation: progress-shine 4s ease-in-out infinite;
}

@keyframes progress-shine {
    0% {
        transform: translateX(-100%) skewX(-15deg);
    }
    100% {
        transform: translateX(200%) skewX(-15deg);
    }
}

/* Section transition effects */
.survey-section {
    position: relative;
}

.survey-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(
        90deg,
        transparent,
        var(--lagoon-secondary),
        var(--lagoon-primary),
        var(--lagoon-secondary),
        transparent
    );
    opacity: 0;
    transition: opacity 0.5s ease;
}

.survey-section.active::after {
    opacity: 1;
}

/* Button hover effects */
.nav-btn {
    position: relative;
    overflow: hidden;
}

.nav-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.nav-btn:hover::after {
    width: 300px;
    height: 300px;
}

/* Reset button specific styling */
.reset-btn {
    background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
    color: white;
    border: 2px solid rgba(255, 107, 107, 0.3);
}

.reset-btn:hover {
    background: linear-gradient(135deg, #ff5252, #ff7979);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

/* Logo switching based on background */
.survey-header {
    position: relative;
}

.survey-header.dark-bg .logo {
    content: url('../images/elav8b-gbg.png');
}

.survey-header.light-bg .logo {
    content: url('../images/elav8b-wbg.png');
}

/* Voice button enhancements */
.voice-btn {
    position: relative;
    overflow: hidden;
}

.voice-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
}

.voice-btn:hover::before {
    width: 100%;
    height: 100%;
}

.voice-btn.recording {
    animation: pulse 1s ease-in-out infinite;
    background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
}

@keyframes pulse {
    0%, 100% {
        transform: translateY(-50%) scale(1);
    }
    50% {
        transform: translateY(-50%) scale(1.1);
    }
}

/* Location input group styles */
.location-input-group {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.location-field {
    position: relative;
    display: flex;
    flex-direction: column;
}

.location-field input,
.location-field select {
    width: 100%;
    margin-bottom: 0.5rem;
}


.location-preview {
    background: rgba(0, 255, 247, 0.1);
    border: 1px solid var(--lagoon-secondary);
    border-radius: var(--radius-sm);
    padding: 0.75rem;
    margin-top: 0.5rem;
    color: var(--lagoon-white);
    font-weight: 500;
    text-align: center;
    min-height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.location-preview:empty {
    display: none;
}

.location-preview.valid {
    background: rgba(76, 175, 80, 0.1);
    border-color: #4CAF50;
    color: #4CAF50;
}

.location-preview.invalid {
    background: rgba(255, 107, 107, 0.1);
    border-color: #ff6b6b;
    color: #ff6b6b;
}

/* Form validation styles */
.form-group.error input,
.form-group.error select,
.form-group.error textarea {
    border-color: #ff6b6b;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.2);
}

.form-group.error::after {
    content: 'This field is required';
    position: absolute;
    bottom: -20px;
    left: 0;
    color: #ff6b6b;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Loading states */
.loading {
    position: relative;
    pointer-events: none;
}

.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: 2px solid var(--lagoon-secondary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Success states */
.success {
    border-color: var(--lagoon-secondary);
    box-shadow: 0 0 0 3px rgba(0, 255, 247, 0.2);
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .voice-btn {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .checkbox-group,
    .radio-group {
        gap: var(--spacing-xs);
    }
    
    .checkbox-label,
    .radio-label {
        padding: var(--spacing-xs);
        font-size: 0.9rem;
    }
    
    .checkmark,
    .radio-mark {
        width: 18px;
        height: 18px;
    }
    
    .location-input-group {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
}

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

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --glass-bg: rgba(255, 255, 255, 0.2);
        --glass-border: rgba(255, 255, 255, 0.4);
    }
    
    input[type="text"],
    input[type="email"],
    select,
    textarea {
        border-width: 2px;
    }
}

/* Congratulations Modal Styles */
.congratulations-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    animation: modalFadeIn 0.5s ease-out;
}

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

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.congratulations-modal-content {
    background: linear-gradient(135deg, var(--lagoon-primary), var(--lagoon-secondary));
    border-radius: var(--radius-lg);
    padding: 2rem;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.5s ease-out;
}

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

.congratulations-header {
    text-align: center;
    margin-bottom: 2rem;
}

.congratulations-logo {
    width: 80px;
    height: auto;
    margin-bottom: 1rem;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
}

.congratulations-title {
    font-family: var(--font-primary);
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--lagoon-white);
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.congratulations-subtitle {
    font-size: 1.2rem;
    color: var(--lagoon-white);
    margin-bottom: 1rem;
    line-height: 1.6;
    font-weight: 500;
}

.congratulations-message {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    margin-bottom: 0;
}

.gift-collection-section {
    background: linear-gradient(135deg, 
        rgba(142, 68, 173, 0.15) 0%,
        rgba(233, 30, 99, 0.1) 25%,
        rgba(0, 255, 247, 0.08) 50%,
        rgba(142, 68, 173, 0.12) 75%,
        rgba(233, 30, 99, 0.1) 100%
    );
    border-radius: var(--radius-md);
    padding: 2rem;
    backdrop-filter: blur(10px);
    border: 2px solid;
    border-image: linear-gradient(135deg, #8e44ad, #e91e63, #00fff7, #8e44ad) 1;
    border-radius: var(--radius-md);
    position: relative;
    box-shadow: 
        0 0 20px rgba(142, 68, 173, 0.2),
        0 0 40px rgba(233, 30, 99, 0.15),
        inset 0 0 20px rgba(0, 255, 247, 0.08);
    animation: gift-breathe 8s ease-in-out infinite;
    overflow: hidden;
}

.gift-collection-section::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(135deg, #8e44ad, #e91e63, #00fff7, #8e44ad);
    border-radius: var(--radius-md);
    z-index: -1;
    animation: border-pulse 12s ease-in-out infinite;
}

.gift-collection-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        transparent 0%,
        rgba(0, 255, 247, 0.05) 25%,
        transparent 50%,
        rgba(142, 68, 173, 0.03) 75%,
        transparent 100%
    );
    animation: shimmer-sweep 15s ease-in-out infinite;
    pointer-events: none;
}

@keyframes gift-breathe {
    0%, 100% {
        background: linear-gradient(135deg, 
            rgba(142, 68, 173, 0.15) 0%,
            rgba(233, 30, 99, 0.1) 25%,
            rgba(0, 255, 247, 0.08) 50%,
            rgba(142, 68, 173, 0.12) 75%,
            rgba(233, 30, 99, 0.1) 100%
        );
        box-shadow: 
            0 0 20px rgba(142, 68, 173, 0.2),
            0 0 40px rgba(233, 30, 99, 0.15),
            inset 0 0 20px rgba(0, 255, 247, 0.08);
    }
    50% {
        background: linear-gradient(135deg, 
            rgba(142, 68, 173, 0.18) 0%,
            rgba(233, 30, 99, 0.12) 25%,
            rgba(0, 255, 247, 0.1) 50%,
            rgba(142, 68, 173, 0.15) 75%,
            rgba(233, 30, 99, 0.12) 100%
        );
        box-shadow: 
            0 0 25px rgba(142, 68, 173, 0.25),
            0 0 50px rgba(233, 30, 99, 0.18),
            inset 0 0 25px rgba(0, 255, 247, 0.1);
    }
}

@keyframes border-pulse {
    0%, 100% {
        background: linear-gradient(135deg, #8e44ad, #e91e63, #00fff7, #8e44ad);
        opacity: 0.8;
    }
    50% {
        background: linear-gradient(135deg, #9c27b0, #e91e63, #00fff7, #9c27b0);
        opacity: 1;
    }
}

@keyframes shimmer-sweep {
    0%, 100% {
        transform: translateX(-100%) translateY(-100%);
        opacity: 0;
    }
    10% {
        opacity: 0.3;
    }
    20% {
        opacity: 0.6;
    }
    30% {
        opacity: 0.4;
    }
    40% {
        opacity: 0.2;
    }
    50% {
        transform: translateX(0%) translateY(0%);
        opacity: 0.1;
    }
    60% {
        opacity: 0.3;
    }
    70% {
        opacity: 0.5;
    }
    80% {
        opacity: 0.3;
    }
    90% {
        opacity: 0.1;
    }
    100% {
        transform: translateX(100%) translateY(100%);
        opacity: 0;
    }
}

@keyframes gradient-shift {
    0% {
        background-position: 0% 0%;
    }
    25% {
        background-position: 100% 0%;
    }
    50% {
        background-position: 100% 100%;
    }
    75% {
        background-position: 0% 100%;
    }
    100% {
        background-position: 0% 0%;
    }
}

.gift-title {
    font-family: var(--font-primary);
    font-size: 1.8rem;
    color: var(--lagoon-white);
    text-align: center;
    margin-bottom: 2rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.gift-form-step {
    animation: stepFadeIn 0.5s ease-out;
}

@keyframes stepFadeIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.gift-form-step h4 {
    color: var(--lagoon-white);
    font-size: 1.3rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.tshirt-size-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.tshirt-size-option {
    position: relative;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    transition: all 0.3s ease;
    overflow: hidden;
}

.tshirt-size-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(0, 255, 247, 0.1),
        transparent
    );
    transition: left 0.8s ease;
    pointer-events: none;
}

.tshirt-size-option:hover::before {
    left: 100%;
}

.tshirt-size-option:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--lagoon-secondary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 255, 247, 0.2);
}

.tshirt-size-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.tshirt-size-option input[type="radio"]:checked + .size-label {
    background: linear-gradient(135deg, var(--lagoon-primary), var(--lagoon-secondary), #8e44ad, #e91e63);
    background-size: 200% 200%;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(0, 255, 247, 0.4);
    border: 2px solid rgba(0, 255, 247, 0.6);
    animation: gradient-shift 60s ease-in-out infinite;
}

.size-label {
    display: block;
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
    color: var(--lagoon-white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.shipping-note {
    color: rgba(255, 255, 255, 0.8);
    font-style: italic;
    text-align: center;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

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

.shipping-form .form-group {
    margin-bottom: 1rem;
}

.shipping-form label {
    color: var(--lagoon-white);
    font-weight: 500;
    margin-bottom: 0.5rem;
    display: block;
}

.shipping-form input,
.shipping-form select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.1);
    color: var(--lagoon-white);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.shipping-form input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.shipping-form input:focus,
.shipping-form select:focus {
    outline: none;
    border-color: var(--lagoon-secondary);
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 0 3px rgba(0, 255, 247, 0.2);
}

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

.gift-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.gift-next-btn,
.gift-back-btn,
.gift-submit-btn {
    padding: 0.75rem 2rem;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gift-next-btn,
.gift-submit-btn {
    background: var(--lagoon-secondary);
    color: var(--lagoon-primary);
}

.gift-next-btn:hover,
.gift-submit-btn:hover {
    background: var(--lagoon-white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 255, 247, 0.3);
}

.gift-back-btn {
    background: rgba(255, 255, 255, 0.2);
    color: var(--lagoon-white);
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.gift-back-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.gift-submit-btn {
    background: linear-gradient(135deg, #ff1744, #e91e63, #9c27b0, #673ab7);
    color: var(--lagoon-white);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(255, 23, 68, 0.4);
    border: 2px solid rgba(255, 255, 255, 0.2);
    animation: submit-glow 2s ease-in-out infinite;
}

@keyframes submit-glow {
    0%, 100% {
        box-shadow: 0 4px 15px rgba(255, 23, 68, 0.4);
    }
    50% {
        box-shadow: 0 6px 20px rgba(255, 23, 68, 0.6);
    }
}

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

.gift-submit-btn:hover {
    background: linear-gradient(135deg, #ff1744, #e91e63, #9c27b0, #3f51b5);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 23, 68, 0.6);
}

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

.gift-submit-btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.gift-submit-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: 2px solid var(--lagoon-white);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .congratulations-modal-content {
        padding: 1.5rem;
        margin: 1rem;
    }
    
    .congratulations-title {
        font-size: 2rem;
    }
    
    .congratulations-subtitle {
        font-size: 1.1rem;
    }
    
    .tshirt-size-options {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.75rem;
    }
    
    .tshirt-size-option {
        padding: 0.75rem;
    }
    
    .size-label {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .address-row {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }
    
    .gift-buttons {
        flex-direction: column;
    }
    
    .gift-next-btn,
    .gift-back-btn,
    .gift-submit-btn {
        width: 100%;
        padding: 1rem;
    }
}

/* Print styles */
@media print {
    .background-container,
    .shimmer-overlay,
    .glass-overlay {
        display: none;
    }
    
    .survey-container {
        background: white;
        color: black;
    }
    
    .survey-form {
        background: white;
        border: 1px solid black;
    }
}
