/**
 * LeadPlayer Frontend Styles
 */

/* Container */
.leadplayer-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    background: #000;
    overflow: hidden;
}

.leadplayer-video-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
}

/* Big Play Button (center overlay) */
.leadplayer-big-play {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    cursor: pointer;
    z-index: 5;
    transition: opacity 0.3s ease;
}

.leadplayer-big-play-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.85);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, opacity 0.2s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.leadplayer-big-play-btn:hover {
    transform: scale(1.1);
    background: rgba(255, 255, 255, 0.95);
}

.leadplayer-big-play-btn svg {
    width: 36px;
    height: 36px;
    color: #333;
    margin-left: 4px; /* Visual centering for play icon */
}

/* Hide big play when video has started */
.leadplayer-container.has-started .leadplayer-big-play {
    opacity: 0;
    pointer-events: none;
}

/* Responsive big play button */
@media (max-width: 480px) {
    .leadplayer-big-play-btn {
        width: 60px;
        height: 60px;
    }

    .leadplayer-big-play-btn svg {
        width: 28px;
        height: 28px;
        margin-left: 3px;
    }
}

/* Video */
.leadplayer-video {
    display: block;
    width: 100%;
    height: auto;
    background: #000;
}

/* Disable right-click menu and native controls */
.leadplayer-video {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    pointer-events: auto;
}

/* Hide native video controls */
.leadplayer-video::-webkit-media-controls {
    display: none !important;
}

.leadplayer-video::-webkit-media-controls-enclosure {
    display: none !important;
}

.leadplayer-video::-webkit-media-controls-panel {
    display: none !important;
}

.leadplayer-video::-webkit-media-controls-play-button {
    display: none !important;
}

.leadplayer-video::-webkit-media-controls-timeline {
    display: none !important;
}

.leadplayer-video::-webkit-media-controls-current-time-display {
    display: none !important;
}

.leadplayer-video::-webkit-media-controls-time-remaining-display {
    display: none !important;
}

.leadplayer-video::-webkit-media-controls-mute-button {
    display: none !important;
}

.leadplayer-video::-webkit-media-controls-volume-slider {
    display: none !important;
}

.leadplayer-video::-webkit-media-controls-fullscreen-button {
    display: none !important;
}

.leadplayer-video::-webkit-media-controls-picture-in-picture-button {
    display: none !important;
}

.leadplayer-video::-moz-media-controls {
    display: none !important;
}

/* Prevent fullscreen */
.leadplayer-video:fullscreen {
    display: none;
}

.leadplayer-video:-webkit-full-screen {
    display: none;
}

.leadplayer-video:-moz-full-screen {
    display: none;
}

/* Controls */
.leadplayer-controls {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.leadplayer-container:hover .leadplayer-controls,
.leadplayer-container.is-paused .leadplayer-controls {
    opacity: 1;
}

.leadplayer-play-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.2);
    border: none;
    border-radius: 50%;
    color: #fff;
    cursor: pointer;
    transition: background 0.2s ease;
}

.leadplayer-play-btn:hover {
    background: rgba(255,255,255,0.3);
}

.leadplayer-play-btn svg {
    width: 20px;
    height: 20px;
}

.leadplayer-time {
    color: #fff;
    font-size: 13px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.leadplayer-time-separator {
    margin: 0 3px;
    opacity: 0.7;
}

/* Hide time option */
.leadplayer-hide-time .leadplayer-time {
    display: none;
}

/* Volume Control */
.leadplayer-volume {
    display: flex;
    align-items: center;
    margin-left: auto;
}

.leadplayer-volume-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: transparent;
    border: none;
    color: #fff;
    cursor: pointer;
    padding: 0;
}

.leadplayer-volume-btn svg {
    width: 22px;
    height: 22px;
}

.leadplayer-volume-btn:hover {
    opacity: 0.8;
}

.leadplayer-volume-slider-wrap {
    width: 0;
    overflow: hidden;
    transition: width 0.2s ease;
}

.leadplayer-volume:hover .leadplayer-volume-slider-wrap,
.leadplayer-volume-slider-wrap:focus-within {
    width: 80px;
}

.leadplayer-volume-slider {
    width: 70px;
    height: 6px;
    margin: 0 8px;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    outline: none;
    border: none;
}

.leadplayer-volume-slider::-webkit-slider-runnable-track {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.3);
    border-radius: 3px;
    border: none;
}

.leadplayer-volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    margin-top: -4px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.4);
    border: none;
}

.leadplayer-volume-slider::-moz-range-track {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.3);
    border-radius: 3px;
    border: none;
}

.leadplayer-volume-slider::-moz-range-thumb {
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    border: none;
    box-shadow: 0 1px 4px rgba(0,0,0,0.4);
}

.leadplayer-volume-slider::-ms-track {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.3);
    border-radius: 3px;
    border: none;
    color: transparent;
}

.leadplayer-volume-slider::-ms-thumb {
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

.leadplayer-volume-slider::-ms-fill-lower,
.leadplayer-volume-slider::-ms-fill-upper {
    background: rgba(255,255,255,0.3);
    border-radius: 3px;
}

/* Overlay */
.leadplayer-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    overflow: hidden;
    padding: 15px;
    box-sizing: border-box;
}

.leadplayer-overlay-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.8);
}

/* Form Container */
.leadplayer-form-container {
    position: relative;
    z-index: 1;
    width: 90%;
    max-width: 350px;
    max-height: 90%;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    overflow-y: auto;
    box-sizing: border-box;
}

/* GHL Embed Container - Fullscreen */
.leadplayer-ghl-container {
    position: relative;
    z-index: 1;
    width: 100vw;
    height: 100vh;
    max-width: none;
    max-height: none;
    background: #fff;
    border-radius: 0;
    overflow: hidden;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.leadplayer-ghl-embed {
    flex: 1;
    width: 100%;
    height: 100%;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.leadplayer-ghl-embed iframe {
    width: 100% !important;
    height: 100% !important;
    min-height: 100vh !important;
    border: none !important;
}

/* GHL overlay - fullscreen on all devices */
.leadplayer-overlay-ghl {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    padding: 0 !important;
    z-index: 999999 !important;
}

.leadplayer-overlay-ghl .leadplayer-overlay-bg {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

/* Form Fields */
.leadplayer-form-fields {
    margin-bottom: 15px;
}

.leadplayer-field {
    margin-bottom: 12px;
}

.leadplayer-field:last-child {
    margin-bottom: 0;
}

.leadplayer-field label {
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
    font-size: 13px;
    color: inherit;
}

.leadplayer-field input[type="text"],
.leadplayer-field input[type="email"],
.leadplayer-field input[type="tel"],
.leadplayer-field select,
.leadplayer-field textarea {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    font-family: inherit;
    background-color: #fff !important;
    color: #333 !important;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.leadplayer-field input:focus,
.leadplayer-field select:focus,
.leadplayer-field textarea:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 2px rgba(34,113,177,0.2);
}

.leadplayer-field textarea {
    min-height: 80px;
    resize: vertical;
}

.leadplayer-field select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 35px;
}

/* Required */
.leadplayer-required {
    color: #d63638;
    margin-left: 2px;
}

/* Checkbox and Radio */
.leadplayer-checkbox-label,
.leadplayer-radio-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
    font-weight: normal;
}

.leadplayer-checkbox-label input,
.leadplayer-radio-label input {
    margin-top: 3px;
}

.leadplayer-radio-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Field Errors */
.leadplayer-field-error {
    display: none;
    margin-top: 5px;
    font-size: 12px;
    color: #d63638;
}

.leadplayer-field.has-error input,
.leadplayer-field.has-error select,
.leadplayer-field.has-error textarea {
    border-color: #d63638;
}

.leadplayer-field.has-error .leadplayer-field-error {
    display: block;
}

/* Form Error */
.leadplayer-form-error {
    padding: 10px 15px;
    margin-bottom: 15px;
    background: #fcf0f1;
    border: 1px solid #d63638;
    border-radius: 4px;
    color: #d63638;
    font-size: 13px;
}

/* Submit Button */
.leadplayer-submit-btn {
    display: block;
    width: 100%;
    padding: 10px 16px;
    background: #2271b1;
    border: none;
    border-radius: 4px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
    box-sizing: border-box;
}

.leadplayer-submit-btn:hover {
    background: #135e96;
}

.leadplayer-submit-btn:active {
    transform: scale(0.98);
}

.leadplayer-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.leadplayer-submit-btn.is-loading {
    position: relative;
    color: transparent;
}

.leadplayer-submit-btn.is-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: #fff;
    border-radius: 50%;
    animation: leadplayer-spin 0.8s linear infinite;
}

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

/* Success Message */
.leadplayer-success-message {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.9);
    color: #fff;
    text-align: center;
    z-index: 10;
    padding: 20px;
}

.leadplayer-success-icon {
    width: 60px;
    height: 60px;
    background: #00a32a;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    animation: leadplayer-pop 0.3s ease;
}

.leadplayer-success-icon svg {
    width: 32px;
    height: 32px;
    color: #fff;
}

.leadplayer-success-text {
    font-size: 18px;
    margin: 0;
    max-width: 300px;
}

@keyframes leadplayer-pop {
    0% { transform: scale(0); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* No Form Notice */
.leadplayer-no-form {
    position: relative;
    z-index: 1;
    padding: 20px;
    background: rgba(255,255,255,0.1);
    border-radius: 8px;
    color: #fff;
    text-align: center;
}

/* Honeypot */
.leadplayer-hp-field {
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Error Display */
.leadplayer-error {
    padding: 15px 20px;
    background: #fcf0f1;
    border: 1px solid #d63638;
    border-radius: 4px;
    color: #d63638;
    font-size: 14px;
}

/* Animations */
.leadplayer-animation-fadeIn .leadplayer-form-container {
    animation: leadplayer-fadeIn 0.3s ease;
}

.leadplayer-animation-slideUp .leadplayer-form-container {
    animation: leadplayer-slideUp 0.4s ease;
}

.leadplayer-animation-slideDown .leadplayer-form-container {
    animation: leadplayer-slideDown 0.4s ease;
}

.leadplayer-animation-zoomIn .leadplayer-form-container {
    animation: leadplayer-zoomIn 0.3s ease;
}

@keyframes leadplayer-fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

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

/* Responsive - Tablet */
@media (max-width: 768px) {
    .leadplayer-form-container {
        max-width: 320px;
        padding: 18px;
    }
}

/* Responsive - Mobile: Fullscreen overlay */
@media (max-width: 600px) {
    .leadplayer-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        width: 100vw;
        height: 100vh;
        z-index: 999999;
        padding: 20px;
    }

    /* No padding when GHL embed is used */
    .leadplayer-overlay-ghl,
    .leadplayer-overlay:has(.leadplayer-ghl-container) {
        padding: 0;
    }

    .leadplayer-overlay-bg {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
    }

    .leadplayer-form-container {
        width: 100%;
        max-width: 400px;
        max-height: 85vh;
        padding: 20px;
        overflow-y: auto;
    }

    .leadplayer-field {
        margin-bottom: 12px;
    }

    .leadplayer-field label {
        font-size: 14px;
        margin-bottom: 5px;
    }

    .leadplayer-field input[type="text"],
    .leadplayer-field input[type="email"],
    .leadplayer-field input[type="tel"],
    .leadplayer-field select,
    .leadplayer-field textarea {
        padding: 12px 14px;
        font-size: 16px; /* Prevents iOS zoom on focus */
    }

    .leadplayer-submit-btn {
        padding: 14px 20px;
        font-size: 16px;
        margin-top: 10px;
    }

    .leadplayer-success-message {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 999999;
    }

    .leadplayer-success-text {
        font-size: 18px;
    }

    .leadplayer-controls {
        padding: 10px 15px;
    }

    .leadplayer-play-btn {
        width: 36px;
        height: 36px;
    }
}

/* Dark mode support - disabled to maintain consistent form appearance */
/* Form always uses light theme for better readability */
