/* Live Demo Popup Styles */
.live-demo-popup {
    position: fixed;
    top: 0;
    right: -420px;
    width: 380px;
    max-width: calc(100vw - 40px);
    height: 100vh;
    background: linear-gradient(180deg, #ffffff 0%, #f8fffe 100%);
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.live-demo-popup.is-visible {
    right: 0;
}

.live-demo-popup__header {
    background: linear-gradient(135deg, #31c8c2 0%, #1e9e99 100%);
    padding: 24px 20px;
    position: relative;
}

.live-demo-popup__close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: #fff;
    font-size: 18px;
}

.live-demo-popup__close:hover {
    background: rgba(255, 255, 255, 0.35);
    transform: scale(1.1);
}

.live-demo-popup__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 16px;
}

.live-demo-popup__badge i {
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.live-demo-popup__title {
    color: #fff;
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.live-demo-popup__subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    margin: 0;
    line-height: 1.5;
}

.live-demo-popup__content {
    flex: 1;
    padding: 28px 24px;
    overflow-y: auto;
}

.live-demo-popup__benefits {
    list-style: none;
    padding: 0;
    margin: 0 0 28px 0;
}

.live-demo-popup__benefits li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    font-size: 14px;
    color: #4a5568;
    line-height: 1.5;
}

.live-demo-popup__benefits li i {
    color: #31c8c2;
    font-size: 16px;
    margin-top: 2px;
    flex-shrink: 0;
}

.live-demo-popup__form-group {
    margin-bottom: 20px;
}

.live-demo-popup__label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
}

.live-demo-popup__phone-wrapper {
    position: relative;
}

/* intl-tel-input customization */
.live-demo-popup .iti {
    width: 100%;
}

.live-demo-popup .iti__tel-input {
    width: 100%;
    padding: 14px 16px 14px 90px;
    font-size: 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    transition: all 0.2s ease;
    background: #fff;
}

.live-demo-popup .iti__tel-input:focus {
    outline: none;
    border-color: #31c8c2;
    box-shadow: 0 0 0 4px rgba(49, 200, 194, 0.15);
}

.live-demo-popup .iti__tel-input.is-invalid {
    border-color: #e53e3e;
}

.live-demo-popup .iti__tel-input.is-valid {
    border-color: #31c8c2;
}

/* Standard text input (for URL field) */
.live-demo-popup__input {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    transition: all 0.2s ease;
    background: #fff;
    box-sizing: border-box;
}

.live-demo-popup__input:focus {
    outline: none;
    border-color: #31c8c2;
    box-shadow: 0 0 0 4px rgba(49, 200, 194, 0.15);
}

.live-demo-popup__input::placeholder {
    color: #a0aec0;
}

.live-demo-popup .iti__country-container {
    padding-left: 12px;
}

.live-demo-popup .iti__selected-country {
    padding-right: 8px;
}

.live-demo-popup__error {
    color: #e53e3e;
    font-size: 12px;
    margin-top: 6px;
    display: none;
}

.live-demo-popup__error.is-visible {
    display: block;
}

.live-demo-popup__submit {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #31c8c2 0%, #1e9e99 100%);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(49, 200, 194, 0.3);
}

.live-demo-popup__submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(49, 200, 194, 0.4);
}

.live-demo-popup__submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.live-demo-popup__submit.is-loading {
    pointer-events: none;
}

.live-demo-popup__submit.is-loading .live-demo-popup__submit-text {
    display: none;
}

.live-demo-popup__submit.is-loading .live-demo-popup__submit-spinner {
    display: block;
}

.live-demo-popup__submit-spinner {
    display: none;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.live-demo-popup__privacy {
    margin-top: 16px;
    text-align: center;
    font-size: 12px;
    color: #718096;
}

.live-demo-popup__privacy a {
    color: #31c8c2;
    text-decoration: none;
}

.live-demo-popup__privacy a:hover {
    text-decoration: underline;
}

/* Success state */
.live-demo-popup__success {
    display: none;
    text-align: center;
    padding: 40px 20px;
}

.live-demo-popup__success.is-visible {
    display: block;
}

.live-demo-popup__success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #31c8c2 0%, #1e9e99 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    animation: success-pop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

.live-demo-popup__success-icon i {
    color: #fff;
    font-size: 36px;
}

.live-demo-popup__success-title {
    font-size: 22px;
    font-weight: 700;
    color: #1e2022;
    margin: 0 0 12px 0;
}

.live-demo-popup__success-message {
    font-size: 15px;
    color: #4a5568;
    margin: 0 0 24px 0;
    line-height: 1.6;
}

.live-demo-popup__success-close {
    padding: 12px 32px;
    background: #f1f5f9;
    color: #4a5568;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.live-demo-popup__success-close:hover {
    background: #e2e8f0;
}

/* Form hidden when success */
.live-demo-popup.is-success .live-demo-popup__form {
    display: none;
}

/* Overlay */
.live-demo-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.live-demo-overlay.is-visible {
    opacity: 1;
    visibility: visible;
}

/* Floating Demo Button */
.live-demo-trigger {
    position: fixed;
    right: 0;
    top: 50%;
    
    z-index: 9998;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    background: linear-gradient(180deg, #31c8c2 0%, #1e9e99 100%);
    color: #fff;
    border: none;
    padding: 16px 12px;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 8px 0 0 8px;
    box-shadow: -4px 0 20px rgba(49, 200, 194, 0.3);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.live-demo-trigger:hover {
    box-shadow: -6px 0 30px rgba(49, 200, 194, 0.5);
}

.live-demo-trigger i {
    writing-mode: horizontal-tb;
    font-size: 16px;
    animation: pulse-icon 2s ease-in-out infinite;
}

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

.live-demo-trigger__dot {
    width: 8px;
    height: 8px;
    background: #fff;
    border-radius: 50%;
    animation: pulse-dot 2s ease-in-out infinite;
}

/* Hide trigger when popup is visible */
.live-demo-popup.is-visible ~ .live-demo-trigger,
.live-demo-trigger.is-hidden {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-50%) translateX(100%);
}

/* Mobile adjustments */
@media (max-width: 480px) {
    .live-demo-popup {
        width: 100%;
        max-width: 100%;
        right: -100%;
    }
    
    .live-demo-popup__header {
        padding: 20px 16px;
    }
    
    .live-demo-popup__title {
        font-size: 20px;
        padding-right: 40px;
    }
    
    .live-demo-popup__content {
        padding: 20px 16px;
    }
    
    .live-demo-trigger {
        padding: 12px 10px;
        font-size: 12px;
    }
}
