/**
 * TopRupees - Video Modal & B2B Form Additional Styles
 * Complementary styles for Tailwind CSS
 */

/* ============================================
   INLINE VIDEO PLAYER STYLES
   ============================================ */

/* Inline Video Container - 16:9 Aspect Ratio */
.inline-video-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    /* Fallback for browsers that don't support aspect-ratio */
    @supports not (aspect-ratio: 16 / 9) {
        &::before {
            content: '';
            display: block;
            padding-top: 56.25%; /* 16:9 ratio */
        }
    }
}

/* Inline Video Player */
.inline-video-player {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #000;
    border-radius: 0.75rem; /* rounded-xl */
}

/* Video Poster Styling */
.inline-video-player::-webkit-media-controls-panel {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
}

/* Inline Video Footer */
.inline-video-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 10;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.inline-video-container:hover .inline-video-footer {
    opacity: 1;
}

/* Hide footer when native controls are visible */
.inline-video-player:paused + .inline-video-footer,
.inline-video-player:hover + .inline-video-footer {
    opacity: 0;
}

/* Expand Link Hover Effect */
.inline-video-expand {
    transition: all 0.2s ease;
}

.inline-video-expand:hover {
    transform: translateX(2px);
}

.inline-video-expand:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Video Loading State */
.inline-video-player[poster] {
    object-fit: cover;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .inline-video-footer {
        opacity: 1; /* Always show on mobile */
        background: rgba(0, 0, 0, 0.8);
    }
    
    .inline-video-expand span {
        display: none; /* Hide text on small screens, keep icon */
    }
}

/* Focus Styles for Accessibility */
.inline-video-player:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* ============================================
   VIDEO MODAL STYLES
   ============================================ */

/* Modal Container Transitions */
.video-modal {
    transition: opacity 0.3s ease;
}

.video-modal.active {
    opacity: 1;
}

.video-modal:not(.active) {
    opacity: 0;
    pointer-events: none;
}

/* Video Wrapper Scale Animation */
.video-modal-wrapper {
    transform: scale(0.95);
    opacity: 0;
}

.video-modal.active .video-modal-wrapper {
    transform: scale(1);
    opacity: 1;
}

/* Close Button Hover Effect */
.video-modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.video-modal-close:active {
    transform: scale(0.95);
}

/* Play Button Pulse Animation */
@keyframes pulse-ring {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }
    100% {
        transform: scale(1.3);
        opacity: 0;
    }
}

.video-modal-play-overlay::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: rgba(102, 126, 234, 0.5);
    animation: pulse-ring 2s ease-out infinite;
}

/* Video Controls Hover */
.video-modal-controls {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.video-modal-controls:hover,
.video:hover + .video-modal-controls,
.video-modal-wrapper:hover .video-modal-controls {
    opacity: 1;
}

/* Progress Bar Hover Effect */
.video-modal-progress {
    position: relative;
    overflow: hidden;
}

.video-modal-progress::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transform: translateX(-100%);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    100% {
        transform: translateX(100%);
    }
}

/* Loading Spinner */
.video-modal-loading .animate-spin {
    border-width: 3px;
}

/* ============================================
   B2B FORM STYLES
   ============================================ */

/* Form Group Styling */
.form-group {
    position: relative;
}

/* Trust Badge Styling */
.trust-badge {
    transition: all 0.3s ease;
}

.trust-badge:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

/* Privacy Assurance */
.privacy-assurance {
    transition: all 0.2s ease;
}

.privacy-assurance:hover {
    color: rgba(255, 255, 255, 0.7);
}

/* Response Time Indicator */
.response-time {
    transition: all 0.2s ease;
}

.response-time:hover {
    color: rgba(255, 255, 255, 0.7);
}

/* Urgency Text */
.urgency-text {
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        opacity: 1;
        text-shadow: 0 0 10px rgba(245, 175, 25, 0.3);
    }
    50% {
        opacity: 0.8;
        text-shadow: 0 0 20px rgba(245, 175, 25, 0.5);
    }
}

/* Submit Button Loading State */
.submit-btn {
    position: relative;
    overflow: hidden;
}

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

.submit-btn.btn-loading .btn-text {
    opacity: 0;
}

.submit-btn.btn-loading .btn-spinner {
    display: inline-block;
}

.submit-btn .btn-spinner {
    display: none;
}

.submit-btn.btn-loading::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: btn-shimmer 1.5s infinite;
}

@keyframes btn-shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Submit Button Success State */
.submit-btn.btn-success {
    background: linear-gradient(135deg, #10b981, #059669) !important;
    pointer-events: none;
}

.submit-btn.btn-success .btn-icon {
    animation: checkmark-bounce 0.5s ease-out;
}

@keyframes checkmark-bounce {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Input Focus States */
input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

/* Checkbox Custom Styling */
input[type="checkbox"]:checked {
    background-color: #667eea;
    border-color: #667eea;
}

input[type="checkbox"]:checked + span {
    color: white;
}

/* Service Selection Card Hover */
label:has(input[type="checkbox"]):hover {
    border-color: rgba(102, 126, 234, 0.5);
    background: rgba(255, 255, 255, 0.08);
}

label:has(input[type="checkbox"]:checked) {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}

/* Submit Button Loading State */
button[type="submit"]:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

button[type="submit"]:disabled:hover {
    transform: none !important;
}

/* Notification Toast Animation */
.form-notification {
    transition: transform 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.form-notification.show {
    transform: translateX(0);
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 768px) {
    .video-modal-wrapper {
        border-radius: 0;
    }

    .video-modal-close {
        top: 8px;
        right: 8px;
        width: 40px;
        height: 40px;
    }

    .video-modal-controls {
        padding: 1rem;
    }

    /* Form Adjustments */
    .glass-card {
        padding: 1.5rem !important;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

/* Focus Visible Styles */
:focus-visible {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .video-modal-backdrop {
        background: rgba(0, 0, 0, 0.95);
    }

    .video-modal-close {
        background: white;
        border: 2px solid black;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .video-modal,
    .video-modal-wrapper,
    .video-modal-backdrop,
    .video-modal-close,
    .video-modal-progress,
    .form-notification {
        transition: none !important;
        animation: none !important;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .video-modal,
    #b2b-inquiry-form {
        display: none !important;
    }
}

/* ============================================
   DARK MODE SPECIFIC
   ============================================ */

@media (prefers-color-scheme: dark) {
    /* Already dark by default, these ensure consistency */
    input,
    select,
    textarea {
        color-scheme: dark;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

/* Glassmorphism Variant */
.glass-card-strong {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

/* Gradient Text */
.gradient-text-purple {
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-text-blue {
    background: linear-gradient(135deg, #4facfe, #00f2fe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Glow Effect */
.glow-purple {
    box-shadow: 0 0 20px rgba(102, 126, 234, 0.4);
}

.glow-blue {
    box-shadow: 0 0 20px rgba(79, 172, 254, 0.4);
}

/* Custom Scrollbar for Form */
.b2b-form-container::-webkit-scrollbar {
    width: 8px;
}

.b2b-form-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

.b2b-form-container::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #667eea, #4facfe);
    border-radius: 4px;
}

.b2b-form-container::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #764ba2, #667eea);
}
