/* Slide Discount Panel - Frontend Styles */

/* CSS Variables */
:root {
    --sdp-gradient: linear-gradient(135deg, #f59e0b, #ef4444);
    --sdp-shadow: 0 4px 20px rgba(245, 158, 11, 0.5);
    --sdp-primary: #f59e0b;
    --sdp-secondary: #ef4444;
    --sdp-text: #1f2937;
    --sdp-text-light: #6b7280;
    --sdp-bg: #ffffff;
    --sdp-border: #e5e7eb;
    --sdp-success: #10b981;
    --sdp-error: #ef4444;
    --sdp-whatsapp: #25D366;
    --sdp-viber: #7360f2;
    --sdp-panel-width: 400px;
    --sdp-btn-width: 60px;
    --sdp-transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Container - z-index high enough to stay above most chat widgets */
.sdp-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    z-index: 2147483640;
    overflow: visible;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    font-size: 16px;
    line-height: 1.5;
}

/* When open, ensure panel is above ALL overlays including chat widgets (z-index: 999999999) */
.sdp-container.sdp-open {
    z-index: 2147483647;
}

.sdp-container.sdp-right {
    right: auto;
    left: auto;
}

.sdp-container.sdp-left {
    right: auto;
    left: auto;
}

/* Toggle Button - always position: fixed for reliable desktop + mobile display */
.sdp-toggle-btn {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: var(--sdp-btn-width);
    height: auto;
    min-height: 160px;
    padding: 15px 10px;
    background: var(--sdp-gradient);
    border: none;
    border-radius: 16px 0 0 16px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: var(--sdp-shadow);
    transition: all var(--sdp-transition);
    z-index: 2;
    overflow: hidden;
}

.sdp-right .sdp-toggle-btn {
    right: 0;
    left: auto;
    border-radius: 16px 0 0 16px;
}

.sdp-left .sdp-toggle-btn {
    left: 0;
    right: auto;
    border-radius: 0 16px 16px 0;
}

.sdp-toggle-btn:hover {
    transform: translateY(-50%) scale(1.05);
    box-shadow: 0 8px 30px rgba(245, 158, 11, 0.6);
}

/* Discount Badge on Button */
.sdp-btn-badge {
    background: rgba(255, 255, 255, 0.25);
    border: 1px dashed rgba(255, 255, 255, 0.6);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    padding: 6px 8px;
    border-radius: 6px;
    letter-spacing: 0.5px;
    text-align: center;
    line-height: 1.2;
}

.sdp-btn-text {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    color: #fff;
    font-weight: 600;
    font-size: 13px;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.sdp-btn-icon {
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.2);
    padding: 8px;
    border-radius: 50%;
}

.sdp-btn-icon svg {
    width: 22px;
    height: 22px;
}

/* Pulse Animation for Button */
.sdp-toggle-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: inherit;
    animation: sdp-pulse 2s ease-in-out infinite;
    pointer-events: none;
}

@keyframes sdp-pulse {
    0%, 100% { opacity: 0; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.05); }
}

/* Panel - position: fixed so it doesn't depend on container dimensions */
.sdp-panel {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: var(--sdp-panel-width);
    max-height: 90vh;
    background: var(--sdp-bg);
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: all var(--sdp-transition);
}

.sdp-right .sdp-panel {
    right: calc(var(--sdp-btn-width) + 15px);
    left: auto;
    transform: translateY(-50%) translateX(30px);
}

.sdp-left .sdp-panel {
    left: calc(var(--sdp-btn-width) + 15px);
    right: auto;
    transform: translateY(-50%) translateX(-30px);
}

.sdp-container.sdp-open .sdp-panel {
    opacity: 1;
    visibility: visible;
}

.sdp-right.sdp-open .sdp-panel {
    transform: translateY(-50%) translateX(0);
}

.sdp-left.sdp-open .sdp-panel {
    transform: translateY(-50%) translateX(0);
}

.sdp-panel-inner {
    padding: 25px 20px;
    max-height: 90vh;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Close Button */
.sdp-close-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    background: #f3f4f6;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.sdp-close-btn:hover {
    background: #e5e7eb;
    transform: rotate(90deg);
}

.sdp-close-btn svg {
    width: 18px;
    height: 18px;
    color: var(--sdp-text-light);
}

/* Header */
.sdp-header {
    text-align: center;
    margin-bottom: 15px;
}

.sdp-header-badge {
    display: inline-block;
    background: var(--sdp-gradient);
    border: 2px dashed rgba(255, 255, 255, 0.5);
    padding: 6px 16px;
    border-radius: 30px;
    margin-bottom: 12px;
    box-shadow: var(--sdp-shadow);
    animation: sdp-bounce 2s ease-in-out infinite;
}

@keyframes sdp-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.sdp-discount-text {
    color: #fff;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.sdp-header-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 12px;
    background: linear-gradient(135deg, #fef3c7, #fde68a);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(245, 158, 11, 0.25);
}

.sdp-header-icon svg {
    width: 28px;
    height: 28px;
    color: var(--sdp-primary);
}

.sdp-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--sdp-text);
    margin: 0;
    background: var(--sdp-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Content */
.sdp-content {
    color: var(--sdp-text-light);
    font-size: 14px;
    margin-bottom: 18px;
    text-align: center;
}

.sdp-content p {
    margin: 0 0 8px 0;
}

.sdp-content p:last-child {
    margin-bottom: 0;
}

/* Form */
.sdp-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.sdp-form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.sdp-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 600;
    font-size: 13px;
    color: var(--sdp-text);
    flex-wrap: wrap;
}

.sdp-label svg {
    color: var(--sdp-primary);
    flex-shrink: 0;
    width: 16px;
    height: 16px;
}

.sdp-optional-tag {
    font-weight: 400;
    font-size: 11px;
    color: var(--sdp-text-light);
}

.sdp-input {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid var(--sdp-border);
    border-radius: 10px;
    font-size: 14px;
    color: var(--sdp-text);
    background: #f9fafb;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.sdp-input:focus {
    outline: none;
    border-color: var(--sdp-primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.sdp-input::placeholder {
    color: #9ca3af;
}

/* Date Range Picker Styles */
.sdp-date-range-group {
    background: #fef7ed;
    padding: 14px;
    border-radius: 12px;
    margin: 0 -4px;
}

.sdp-date-inputs {
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

.sdp-date-field {
    flex: 1;
    min-width: 0;
}

.sdp-date-sublabel {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--sdp-text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.sdp-date-input {
    padding: 10px 8px;
    font-size: 13px;
    text-align: center;
}

.sdp-date-input::-webkit-calendar-picker-indicator {
    cursor: pointer;
    opacity: 0.6;
}

.sdp-date-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 8px;
    color: var(--sdp-primary);
    flex-shrink: 0;
}

.sdp-date-arrow svg {
    width: 18px;
    height: 18px;
}

.sdp-days-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 10px;
    padding: 8px 12px;
    background: var(--sdp-gradient);
    border-radius: 20px;
    color: #fff;
}

.sdp-days-count {
    font-size: 18px;
    font-weight: 800;
}

.sdp-days-label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Checkbox Group */
.sdp-label-checkbox-group {
    margin-bottom: 3px;
}

.sdp-checkbox-note {
    font-size: 12px;
    color: var(--sdp-text-light);
    margin: 0 0 8px 0;
}

.sdp-checkbox-group {
    display: flex;
    gap: 10px;
}

.sdp-checkbox-item {
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 8px;
    background: #f9fafb;
    border: 2px solid var(--sdp-border);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.sdp-checkbox-item:hover {
    border-color: #d1d5db;
    background: #f3f4f6;
}

.sdp-checkbox-item input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.sdp-checkbox-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    background: #fff;
}

.sdp-checkbox-custom svg {
    opacity: 0;
    transform: scale(0);
    transition: all 0.2s ease;
    color: #fff;
    width: 14px;
    height: 14px;
}

.sdp-checkbox-item input:checked + .sdp-checkbox-custom {
    background: var(--sdp-primary);
    border-color: var(--sdp-primary);
}

.sdp-checkbox-item input:checked + .sdp-checkbox-custom svg {
    opacity: 1;
    transform: scale(1);
}

.sdp-checkbox-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.sdp-checkbox-icon svg {
    width: 18px;
    height: 18px;
}

.sdp-whatsapp-icon {
    background: rgba(37, 211, 102, 0.1);
    color: var(--sdp-whatsapp);
}

.sdp-viber-icon {
    background: rgba(115, 96, 242, 0.1);
    color: var(--sdp-viber);
}

.sdp-checkbox-item.sdp-whatsapp:has(input:checked) {
    border-color: var(--sdp-whatsapp);
    background: rgba(37, 211, 102, 0.05);
}

.sdp-checkbox-item.sdp-whatsapp:has(input:checked) .sdp-checkbox-custom {
    background: var(--sdp-whatsapp);
    border-color: var(--sdp-whatsapp);
}

.sdp-checkbox-item.sdp-whatsapp:has(input:checked) .sdp-whatsapp-icon {
    background: var(--sdp-whatsapp);
    color: #fff;
}

.sdp-checkbox-item.sdp-viber:has(input:checked) {
    border-color: var(--sdp-viber);
    background: rgba(115, 96, 242, 0.05);
}

.sdp-checkbox-item.sdp-viber:has(input:checked) .sdp-checkbox-custom {
    background: var(--sdp-viber);
    border-color: var(--sdp-viber);
}

.sdp-checkbox-item.sdp-viber:has(input:checked) .sdp-viber-icon {
    background: var(--sdp-viber);
    color: #fff;
}

.sdp-checkbox-text {
    font-size: 12px;
    font-weight: 600;
    color: var(--sdp-text);
}

/* Error Message */
.sdp-error-message {
    font-size: 12px;
    color: var(--sdp-error);
    display: none;
    margin-top: 4px;
}

.sdp-error-message.visible {
    display: block;
}

.sdp-form-group.sdp-has-error .sdp-input {
    border-color: var(--sdp-error);
}

.sdp-form-group.sdp-has-error .sdp-checkbox-item {
    border-color: var(--sdp-error);
}

/* Submit Button */
.sdp-submit-btn {
    width: 100%;
    padding: 14px 20px;
    background: var(--sdp-gradient);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--sdp-shadow);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-top: 4px;
}

.sdp-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(245, 158, 11, 0.5);
}

.sdp-submit-btn:active {
    transform: translateY(0);
}

.sdp-btn-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.sdp-btn-content svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.sdp-submit-text {
    white-space: nowrap;
}

.sdp-btn-loading {
    display: none;
}

.sdp-submit-btn.sdp-loading .sdp-btn-content {
    display: none;
}

.sdp-submit-btn.sdp-loading .sdp-btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
}

.sdp-spinner {
    animation: sdp-spin 1s linear infinite;
}

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

/* Success State */
.sdp-success {
    display: none;
    text-align: center;
    padding: 15px 0;
    animation: sdp-fadeIn 0.5s ease;
}

@keyframes sdp-fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sdp-form.sdp-hidden {
    display: none;
}

.sdp-success.sdp-visible {
    display: block;
}

.sdp-success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 15px;
    background: var(--sdp-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(245, 158, 11, 0.4);
    animation: sdp-celebrate 0.6s ease;
}

@keyframes sdp-celebrate {
    0% { transform: scale(0) rotate(-45deg); }
    50% { transform: scale(1.2) rotate(10deg); }
    100% { transform: scale(1) rotate(0deg); }
}

.sdp-success-icon svg {
    color: #fff;
    width: 40px;
    height: 40px;
}

.sdp-success-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--sdp-text);
    margin: 0 0 8px 0;
    background: var(--sdp-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sdp-success-message {
    color: var(--sdp-text-light);
    font-size: 14px;
    margin: 0;
}

/* Button Hidden State (when panel is open) */
.sdp-container.sdp-open .sdp-toggle-btn {
    opacity: 0;
    pointer-events: none;
    transform: translateY(-50%) translateX(20px);
}

.sdp-left.sdp-open .sdp-toggle-btn {
    transform: translateY(-50%) translateX(-20px);
}

/* Confetti Effect (optional decorative) */
.sdp-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--sdp-gradient);
}

/* GDPR Styling */
.sdp-gdpr-group {
    margin-top: -2px;
    margin-bottom: 2px;
}

.sdp-gdpr-label {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    cursor: pointer;
}

.sdp-gdpr-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin-top: 2px;
    flex-shrink: 0;
    accent-color: var(--sdp-primary);
    border: 1px solid var(--sdp-border);
    border-radius: 4px;
    cursor: pointer;
}

.sdp-gdpr-text {
    font-size: 11px;
    color: var(--sdp-text-light);
    line-height: 1.4;
    font-weight: 400;
}

.sdp-gdpr-group.sdp-has-error .sdp-gdpr-text {
    color: var(--sdp-error);
}

/* ==================== */
/* IMPROVED MOBILE STYLES */
/* ==================== */

@media (max-width: 768px) {
    :root {
        --sdp-panel-width: calc(100vw - 20px);
    }

    /* Mobile: button becomes horizontal pill at bottom */
    .sdp-toggle-btn {
        bottom: 15px;
        top: auto;
        transform: none;
        flex-direction: row;
        width: auto;
        min-height: auto;
        height: auto;
        padding: 10px 16px;
        border-radius: 30px !important;
        gap: 10px;
    }

    .sdp-toggle-btn::before {
        border-radius: 30px;
    }

    .sdp-right .sdp-toggle-btn {
        right: 15px;
        left: auto;
    }

    .sdp-left .sdp-toggle-btn {
        left: 15px;
        right: auto;
    }

    .sdp-btn-text {
        writing-mode: horizontal-tb;
        text-orientation: initial;
        font-size: 12px;
    }

    .sdp-btn-badge {
        padding: 4px 8px;
        font-size: 10px;
    }

    .sdp-toggle-btn:hover {
        transform: scale(1.05);
    }

    /* Mobile: panel slides up from bottom */
    .sdp-panel {
        top: auto;
        bottom: 70px;
        left: 10px !important;
        right: 10px !important;
        transform: translateY(30px) !important;
        max-height: calc(100vh - 90px);
        max-height: calc(100dvh - 90px);
        border-radius: 16px;
        width: auto;
    }

    .sdp-container.sdp-open .sdp-panel {
        transform: translateY(0) !important;
    }

    .sdp-container.sdp-open .sdp-toggle-btn {
        transform: translateY(10px);
        opacity: 0;
        pointer-events: none;
    }
    
    .sdp-panel-inner {
        padding: 20px 16px 24px;
        max-height: calc(100vh - 100px);
        max-height: calc(100dvh - 100px);
    }
    
    .sdp-header {
        margin-bottom: 12px;
    }
    
    .sdp-header-badge {
        padding: 5px 14px;
        margin-bottom: 10px;
    }
    
    .sdp-discount-text {
        font-size: 14px;
    }
    
    .sdp-header-icon {
        width: 50px;
        height: 50px;
        border-radius: 12px;
        margin-bottom: 10px;
    }
    
    .sdp-header-icon svg {
        width: 24px;
        height: 24px;
    }
    
    .sdp-title {
        font-size: 20px;
    }
    
    .sdp-content {
        font-size: 13px;
        margin-bottom: 14px;
    }
    
    .sdp-form {
        gap: 12px;
    }
    
    .sdp-label {
        font-size: 12px;
    }
    
    .sdp-input {
        padding: 11px 12px;
        font-size: 14px;
        border-radius: 8px;
    }
    
    /* Date Range Mobile Improvements */
    .sdp-date-range-group {
        padding: 12px;
        margin: 0;
    }
    
    .sdp-date-inputs {
        flex-direction: column;
        gap: 10px;
    }
    
    .sdp-date-field {
        width: 100%;
    }
    
    .sdp-date-arrow {
        padding: 0;
        transform: rotate(90deg);
    }
    
    .sdp-date-input {
        padding: 11px 10px;
        font-size: 14px;
    }
    
    .sdp-days-display {
        margin-top: 8px;
        padding: 6px 10px;
    }
    
    .sdp-days-count {
        font-size: 16px;
    }
    
    .sdp-days-label {
        font-size: 11px;
    }
    
    /* Checkbox Mobile */
    .sdp-checkbox-group {
        gap: 8px;
    }
    
    .sdp-checkbox-item {
        padding: 10px 6px;
        border-radius: 8px;
    }
    
    .sdp-checkbox-icon {
        width: 34px;
        height: 34px;
    }
    
    .sdp-checkbox-icon svg {
        width: 16px;
        height: 16px;
    }
    
    .sdp-checkbox-text {
        font-size: 11px;
    }
    
    .sdp-checkbox-custom {
        width: 18px;
        height: 18px;
    }
    
    .sdp-checkbox-custom svg {
        width: 12px;
        height: 12px;
    }
    
    /* Submit Button Mobile - FIXED */
    .sdp-submit-btn {
        padding: 14px 16px;
        font-size: 14px;
        border-radius: 10px;
        margin-top: 6px;
        /* Ensure full visibility */
        position: relative;
        z-index: 5;
    }
    
    .sdp-btn-content {
        gap: 6px;
    }
    
    .sdp-btn-content svg {
        width: 16px;
        height: 16px;
    }
    
    .sdp-submit-text {
        font-size: 13px;
    }
    
    /* GDPR Mobile */
    .sdp-gdpr-text {
        font-size: 10px;
        line-height: 1.35;
    }
    
    .sdp-gdpr-label input[type="checkbox"] {
        width: 14px;
        height: 14px;
    }
    
    /* Success State Mobile */
    .sdp-success-icon {
        width: 70px;
        height: 70px;
        margin-bottom: 12px;
    }
    
    .sdp-success-icon svg {
        width: 35px;
        height: 35px;
    }
    
    .sdp-success-title {
        font-size: 20px;
    }
    
    .sdp-success-message {
        font-size: 13px;
    }
    
    /* Close Button Mobile */
    .sdp-close-btn {
        width: 30px;
        height: 30px;
        top: 10px;
        right: 10px;
    }
    
    .sdp-close-btn svg {
        width: 16px;
        height: 16px;
    }
}

/* Extra small screens */
@media (max-width: 400px) {
    .sdp-panel-inner {
        padding: 16px 14px 20px;
    }
    
    .sdp-header-badge {
        padding: 4px 12px;
    }
    
    .sdp-discount-text {
        font-size: 13px;
    }
    
    .sdp-title {
        font-size: 18px;
    }
    
    .sdp-content {
        font-size: 12px;
    }
    
    .sdp-input {
        padding: 10px;
        font-size: 14px;
    }
    
    .sdp-submit-btn {
        padding: 12px 14px;
    }
    
    .sdp-submit-text {
        font-size: 12px;
    }
    
    .sdp-checkbox-text {
        font-size: 10px;
    }
    
    .sdp-checkbox-icon {
        width: 30px;
        height: 30px;
    }
    
    .sdp-checkbox-icon svg {
        width: 14px;
        height: 14px;
    }
    
    .sdp-gdpr-text {
        font-size: 9px;
    }
}

/* Safe area insets for notched phones */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
    @media (max-width: 768px) {
        .sdp-toggle-btn {
            bottom: calc(15px + env(safe-area-inset-bottom));
        }
        
        .sdp-panel {
            bottom: calc(70px + env(safe-area-inset-bottom));
            max-height: calc(100vh - 90px - env(safe-area-inset-bottom));
            max-height: calc(100dvh - 90px - env(safe-area-inset-bottom));
        }
        
        .sdp-panel-inner {
            padding-bottom: calc(20px + env(safe-area-inset-bottom));
        }
    }
}

/* Smooth scrollbar for panel */
.sdp-panel-inner::-webkit-scrollbar {
    width: 5px;
}

.sdp-panel-inner::-webkit-scrollbar-track {
    background: transparent;
}

.sdp-panel-inner::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.sdp-panel-inner::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* ======================== */
/* Custom Content Mode CTA  */
/* ======================== */

.sdp-cta-wrapper {
    margin-top: 20px;
    text-align: center;
}

.sdp-cta-btn {
    display: inline-block;
    width: 100%;
    padding: 14px 24px;
    background: var(--sdp-gradient);
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: var(--sdp-shadow);
    transition: all 0.3s ease;
    text-decoration: none;
    text-align: center;
    box-sizing: border-box;
}

.sdp-cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(245, 158, 11, 0.5);
    color: #fff;
    text-decoration: none;
}

.sdp-cta-btn:active {
    transform: translateY(0);
}

.sdp-cta-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.sdp-cta-content svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* Custom content mode: adjust header icon background */
.sdp-mode-custom_content .sdp-header-icon {
    background: linear-gradient(135deg, #dbeafe, #bfdbfe);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.25);
}

.sdp-mode-custom_content .sdp-header-icon svg {
    color: #3b82f6;
}

/* Custom content mode: richer content area */
.sdp-mode-custom_content .sdp-content {
    text-align: left;
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 6px;
}

.sdp-mode-custom_content .sdp-content p {
    margin: 0 0 12px 0;
}

.sdp-mode-custom_content .sdp-content ul,
.sdp-mode-custom_content .sdp-content ol {
    padding-left: 20px;
    margin: 0 0 12px 0;
}

.sdp-mode-custom_content .sdp-content li {
    margin-bottom: 4px;
}

.sdp-mode-custom_content .sdp-content a {
    color: var(--sdp-primary);
    text-decoration: underline;
}

.sdp-mode-custom_content .sdp-content a:hover {
    color: var(--sdp-secondary);
}

/* ======================================= */
/* Custom Content Structured Card - 2026   */
/* ======================================= */

.sdp-custom-card {
    background: linear-gradient(145deg, #f8fafc, #f1f5f9);
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 18px 16px;
    margin-bottom: 16px;
    text-align: center;
}

.sdp-custom-heading {
    font-size: 15px;
    font-weight: 700;
    color: var(--sdp-text);
    line-height: 1.45;
    margin: 0 0 14px 0;
    padding: 0 4px;
    text-align: center;
}

.sdp-custom-image-wrap {
    margin: 0 auto 14px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    line-height: 0;
}

.sdp-custom-image {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    max-height: 280px;
}

.sdp-custom-description {
    font-size: 13px;
    line-height: 1.65;
    color: var(--sdp-text-light);
    margin: 0;
    padding: 0 2px;
    text-align: left;
}

@media (max-width: 768px) {
    .sdp-cta-btn {
        padding: 12px 20px;
        font-size: 14px;
        border-radius: 10px;
    }

    .sdp-cta-content svg {
        width: 16px;
        height: 16px;
    }

    /* Custom card mobile */
    .sdp-custom-card {
        padding: 14px 12px;
        border-radius: 12px;
        margin-bottom: 12px;
    }

    .sdp-custom-heading {
        font-size: 14px;
        margin-bottom: 12px;
    }

    .sdp-custom-image-wrap {
        margin-bottom: 12px;
        border-radius: 8px;
    }

    .sdp-custom-image {
        max-height: 220px;
    }

    .sdp-custom-description {
        font-size: 12px;
        line-height: 1.6;
    }
}

@media (max-width: 400px) {
    .sdp-custom-card {
        padding: 12px 10px;
    }

    .sdp-custom-heading {
        font-size: 13px;
    }

    .sdp-custom-image {
        max-height: 180px;
    }

    .sdp-custom-description {
        font-size: 11px;
    }
}

/* Print styles - hide panel */
@media print {
    .sdp-container {
        display: none !important;
    }
}

/* Flatpickr Date Range Picker Custom Styling */
.sdp-date-range-container {
    position: relative;
}

.sdp-date-range-input {
    cursor: pointer;
    background-color: #fff;
    text-align: left;
}

.sdp-date-range-input::placeholder {
    color: var(--sdp-text-light);
    opacity: 0.7;
}

/* Flatpickr Calendar Container */
.sdp-flatpickr.flatpickr-calendar {
    background: #fff;
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border-radius: 16px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    padding: 10px;
    z-index: 2147483647 !important;
}

/* Header styling */
.sdp-flatpickr .flatpickr-months {
    padding: 10px 0;
}

.sdp-flatpickr .flatpickr-month {
    color: var(--sdp-text);
    fill: var(--sdp-text);
}

.sdp-flatpickr .flatpickr-current-month {
    font-size: 14px;
    font-weight: 600;
    color: var(--sdp-text);
}

.sdp-flatpickr .flatpickr-monthDropdown-months {
    background: transparent;
    font-weight: 600;
}

.sdp-flatpickr .flatpickr-prev-month,
.sdp-flatpickr .flatpickr-next-month {
    fill: var(--sdp-primary);
}

.sdp-flatpickr .flatpickr-prev-month:hover,
.sdp-flatpickr .flatpickr-next-month:hover {
    fill: var(--sdp-secondary);
}

/* Weekdays */
.sdp-flatpickr .flatpickr-weekdays {
    margin-top: 8px;
}

.sdp-flatpickr .flatpickr-weekday {
    color: var(--sdp-text-light);
    font-weight: 600;
    font-size: 12px;
}

/* Days */
.sdp-flatpickr .flatpickr-day {
    color: var(--sdp-text);
    border: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.sdp-flatpickr .flatpickr-day:hover {
    background: #fef7ed;
    border-color: transparent;
    color: var(--sdp-text);
}

.sdp-flatpickr .flatpickr-day.today {
    border-color: var(--sdp-primary);
    background: transparent;
    color: var(--sdp-primary);
    font-weight: 700;
}

.sdp-flatpickr .flatpickr-day.today:hover {
    background: #fef7ed;
    border-color: var(--sdp-primary);
}

/* Selected days */
.sdp-flatpickr .flatpickr-day.selected,
.sdp-flatpickr .flatpickr-day.startRange,
.sdp-flatpickr .flatpickr-day.endRange {
    background: var(--sdp-gradient);
    border-color: transparent;
    color: #fff;
    font-weight: 700;
}

.sdp-flatpickr .flatpickr-day.selected:hover,
.sdp-flatpickr .flatpickr-day.startRange:hover,
.sdp-flatpickr .flatpickr-day.endRange:hover {
    background: var(--sdp-secondary);
    border-color: transparent;
    color: #fff;
}

/* In-range days */
.sdp-flatpickr .flatpickr-day.inRange {
    background: #fef7ed;
    border-color: transparent;
    box-shadow: -5px 0 0 #fef7ed, 5px 0 0 #fef7ed;
    border-radius: 0;
}

.sdp-flatpickr .flatpickr-day.startRange {
    border-radius: 8px 0 0 8px;
}

.sdp-flatpickr .flatpickr-day.endRange {
    border-radius: 0 8px 8px 0;
}

.sdp-flatpickr .flatpickr-day.startRange.endRange {
    border-radius: 8px;
}

/* Disabled days */
.sdp-flatpickr .flatpickr-day.flatpickr-disabled {
    color: #d1d5db;
    cursor: not-allowed;
}

.sdp-flatpickr .flatpickr-day.flatpickr-disabled:hover {
    background: transparent;
    border-color: transparent;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .sdp-flatpickr.flatpickr-calendar {
        max-width: 95vw;
        width: 100%;
    }

    .sdp-flatpickr .flatpickr-months {
        flex-direction: column;
        display: flex !important;
        padding: 10px 0 15px;
    }

    .sdp-flatpickr .flatpickr-month {
        width: 100%;
        display: flex !important;
        justify-content: center;
        align-items: center;
        height: auto;
        min-height: 40px;
    }

    .sdp-flatpickr .flatpickr-current-month {
        font-size: 18px !important;
        font-weight: 700 !important;
        padding: 10px 0 !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        width: 100%;
        position: static !important;
        transform: none !important;
        left: auto !important;
        height: auto !important;
    }

    .sdp-flatpickr .flatpickr-current-month .flatpickr-monthDropdown-months {
        font-size: 18px !important;
        font-weight: 700 !important;
        appearance: none;
        background: transparent;
        border: none;
        color: var(--sdp-text);
        padding: 0 5px;
    }

    .sdp-flatpickr .flatpickr-current-month .numInputWrapper {
        display: inline-block !important;
    }

    .sdp-flatpickr .flatpickr-current-month input.cur-year {
        font-size: 18px !important;
        font-weight: 700 !important;
        color: var(--sdp-text);
        padding: 0;
    }

    .sdp-flatpickr .flatpickr-prev-month,
    .sdp-flatpickr .flatpickr-next-month {
        position: relative !important;
        height: 40px !important;
        padding: 10px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    .sdp-flatpickr .flatpickr-days {
        max-width: 100%;
        width: 100%;
    }

    .sdp-flatpickr .flatpickr-day {
        max-width: 14.2857%;
        height: 40px;
        line-height: 40px;
        font-size: 14px;
    }

    .sdp-flatpickr .flatpickr-weekday {
        font-size: 12px;
        font-weight: 600;
    }
}

@media (max-width: 480px) {
    .sdp-flatpickr.flatpickr-calendar.showTimeInput.hasTime .flatpickr-time {
        max-width: 100%;
    }
}

/* International Phone Input (intl-tel-input) Custom Styling */
.iti {
    width: 100%;
    display: block;
}

.iti__flag-container {
    position: absolute;
    top: 0;
    bottom: 0;
    right: auto;
    left: 0;
    padding: 0;
}

.iti__selected-flag {
    padding: 0 14px;
    border-radius: 10px 0 0 10px;
    background: #f9fafb;
    border: 2px solid var(--sdp-border);
    border-right: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    outline: none;
}

.iti__selected-flag:hover,
.iti__selected-flag:focus {
    background: #fff;
}

.iti--allow-dropdown .iti__flag-container:hover .iti__selected-flag,
.iti--allow-dropdown .iti__flag-container:focus .iti__selected-flag {
    background: #fff;
}

#sdp-phone {
    padding-left: 90px !important;
    border-radius: 10px !important;
}

.iti__country-list {
    background: #fff;
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    margin-top: 4px;
    max-height: 200px;
    z-index: 2147483647;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

.iti__country {
    padding: 10px 14px;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f3f4f6;
}

.iti__country:hover,
.iti__country.iti__highlight {
    background: #fef7ed;
    color: var(--sdp-text);
}

.iti__country-name,
.iti__dial-code {
    color: var(--sdp-text);
}

.iti__divider {
    border-bottom: 2px solid var(--sdp-border);
    margin: 4px 0;
}

.iti__arrow {
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 5px solid var(--sdp-text-light);
    margin-left: 6px;
    transition: all 0.2s ease;
}

.iti--show-flags .iti__arrow {
    margin-left: 6px;
}

.iti__selected-flag:hover .iti__arrow,
.iti__selected-flag:focus .iti__arrow {
    border-top-color: var(--sdp-primary);
}

/* When dropdown is open */
.iti--container {
    z-index: 2147483647 !important;
}

/* Focus state */
.iti__selected-flag:focus {
    border-color: var(--sdp-primary);
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

.iti--allow-dropdown input:focus + .iti__flag-container .iti__selected-flag,
#sdp-phone:focus {
    border-color: var(--sdp-primary);
}

#sdp-phone:focus ~ .iti__flag-container .iti__selected-flag,
.iti--allow-dropdown input:focus ~ .iti__flag-container .iti__selected-flag {
    border-color: var(--sdp-primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.1);
}

/* Error state */
.sdp-form-group.sdp-has-error .iti__selected-flag {
    border-color: var(--sdp-error);
}

.sdp-form-group.sdp-has-error #sdp-phone {
    border-color: var(--sdp-error);
}

/* Mobile responsive */
@media (max-width: 768px) {
    #sdp-phone {
        padding-left: 85px !important;
        font-size: 14px;
    }

    .iti__selected-flag {
        padding: 0 12px;
    }

    .iti__country-list {
        max-height: 180px;
    }
}
