/* ==========================================================================
   OPC (One Page Checkout) Demo Settings Side Panel
   Clean, Professional & Handcrafted Interface for WHMCS Orderform Showcase
   ========================================================================== */

/* Panel Base Container */
.opc-demo-trigger,
.opc-demo-panel,
.opc-demo-toast {
    font-family: "Inter 24pt", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    box-sizing: border-box;
    -webkit-font-smoothing: antialiased;
}

.opc-demo-trigger *,
.opc-demo-panel *,
.opc-demo-toast * {
    box-sizing: border-box;
}

/* ==========================================================================
   1. Floating Trigger Button (Clean, Subtle Side Tab)
   ========================================================================== */
.opc-demo-trigger {
    position: fixed;
    right: 0;
    top: 200px;
    z-index: 99999;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #ffffff;
    color: #374151 !important;
    padding: 12px 18px 12px 15px;
    border-radius: 8px 0 0 8px;
    border: 1px solid #d1d5db;
    border-right: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    line-height: 1;
    transition: all 0.25s ease;
    user-select: none;
}

.opc-demo-trigger:hover {
    background: #f9fafb;
    color: #111827 !important;
    padding-left: 19px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.16);
}

/* Blinking / Pulsing Live Dot */
.opc-trigger-dot {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 9px;
    height: 9px;
    background-color: #10b981;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 0 6px rgba(16, 185, 129, 0.7);
    animation: opcDotBlink 1.4s ease-in-out infinite;
}

.opc-trigger-dot::after {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 50%;
    background-color: #10b981;
    opacity: 0.6;
    animation: opcDotPing 1.4s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes opcDotBlink {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.25;
        transform: scale(0.85);
    }
}

@keyframes opcDotPing {
    0% {
        transform: scale(0.8);
        opacity: 0.8;
    }
    70%, 100% {
        transform: scale(2.2);
        opacity: 0;
    }
}

.opc-trigger-icon {
    font-size: 18px;
    color: #4b5563;
    display: flex;
    align-items: center;
    justify-content: center;
}

.opc-trigger-badge {
    color: #1f2937;
    white-space: nowrap;
    font-size: 15px;
    font-weight: 600;
}

/* ==========================================================================
   2. Backdrop Overlay
   ========================================================================== */
.opc-demo-backdrop {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(17, 24, 39, 0.35);
    z-index: 100000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

.opc-demo-backdrop.is-active {
    opacity: 1;
    visibility: visible;
}

/* ==========================================================================
   3. Side Panel Drawer (Decent & Compact)
   ========================================================================== */
.opc-demo-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 410px;
    max-width: 90vw;
    height: 100vh;
    background: #ffffff;
    box-shadow: -4px 0 24px rgba(0, 0, 0, 0.12);
    z-index: 100001;
    display: flex;
    flex-direction: column;
    transform: translateX(100%);
    transition: transform 0.28s ease;
    overflow: hidden;

    /* Default Theme Variables (Corporate Blue) */
    --opc-theme-primary: #204E7F;
    --opc-theme-primary-hover: #173b61;
    --opc-theme-accent: #007bff;
    --opc-theme-light-bg: #eff6ff;
    --opc-theme-border: #bfdbfe;
}

/* Color Scheme Themes for Demo Panel */
.opc-demo-panel.opc-theme-corporate_blue {
    --opc-theme-primary: #204E7F;
    --opc-theme-primary-hover: #173b61;
    --opc-theme-accent: #007bff;
    --opc-theme-light-bg: #eff6ff;
    --opc-theme-border: #bfdbfe;
}

.opc-demo-panel.opc-theme-modern_teal {
    --opc-theme-primary: #054F34;
    --opc-theme-primary-hover: #033925;
    --opc-theme-accent: #14B8A6;
    --opc-theme-light-bg: #f0fdf9;
    --opc-theme-border: #99f6e4;
}

.opc-demo-panel.opc-theme-prestige_purple {
    --opc-theme-primary: #5A2D82;
    --opc-theme-primary-hover: #452163;
    --opc-theme-accent: #8B5CF6;
    --opc-theme-light-bg: #faf5ff;
    --opc-theme-border: #ddd6fe;
}

.opc-demo-panel.opc-theme-nature_green {
    --opc-theme-primary: #1B5E20;
    --opc-theme-primary-hover: #134617;
    --opc-theme-accent: #22C55E;
    --opc-theme-light-bg: #f0fdf4;
    --opc-theme-border: #bbf7d0;
}

.opc-demo-panel.is-active {
    transform: translateX(0);
}

/* ==========================================================================
   4. Panel Header
   ========================================================================== */
.opc-demo-header {
    padding: 16px 20px;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.opc-demo-header-info h3 {
    margin: 0 0 3px;
    font-size: 15px;
    font-weight: 600;
    color: #111827;
    line-height: 1.25;
}

.opc-demo-header-info p {
    margin: 0;
    font-size: 12px;
    color: #6b7280;
    line-height: 1.35;
}

.opc-demo-close-btn {
    background: transparent;
    border: 1px solid transparent;
    color: #6b7280;
    width: 30px;
    height: 30px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.15s ease;
    padding: 0;
}

.opc-demo-close-btn:hover {
    background: #e5e7eb;
    color: #111827;
}

/* ==========================================================================
   5. Panel Body (Scrollable)
   ========================================================================== */
.opc-demo-body {
    flex: 1 1 auto;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px 18px;
    background: #f9fafb;
}

.opc-demo-body::-webkit-scrollbar {
    width: 5px;
}

.opc-demo-body::-webkit-scrollbar-track {
    background: #f1f5f9;
}

.opc-demo-body::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

.opc-demo-body::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* ==========================================================================
   6. Sections
   ========================================================================== */
.opc-demo-section {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 14px;
    margin-bottom: 14px;
}

.opc-section-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid #f3f4f6;
}

.opc-section-header i {
    font-size: 13px;
    color: var(--opc-theme-primary, #204e7f);
    transition: color 0.2s ease;
}

.opc-section-title h4 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    color: #1f2937;
}

.opc-section-title p {
    margin: 2px 0 0;
    font-size: 11px;
    color: #6b7280;
}

/* ==========================================================================
   7. Option Cards (2-Column Grid)
   ========================================================================== */
.opc-card-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.opc-option-card {
    position: relative;
    border: 1px solid #e5e7eb;
    background: #ffffff;
    border-radius: 6px;
    padding: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    display: flex;
    flex-direction: column;
    text-align: left;
}

.opc-option-card:hover {
    border-color: #9ca3af;
    background: #fafafa;
}

.opc-option-card.is-active {
    border-color: var(--opc-theme-primary, #204e7f);
    background: var(--opc-theme-light-bg, #eff6ff);
}

/* Checkmark indicator for active card */
.opc-card-check {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 18px;
    height: 18px;
    background: var(--opc-theme-primary, #204e7f);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    opacity: 0;
    transition: opacity 0.15s ease, background-color 0.2s ease;
    z-index: 2;
}

.opc-option-card.is-active .opc-card-check {
    opacity: 1;
}

/* Thumbnail Wrap */
.opc-card-img-wrap {
    width: 100%;
    height: 70px;
    border-radius: 4px;
    overflow: hidden;
    background: #f3f4f6;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #e5e7eb;
}

.opc-card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}

/* Card Info */
.opc-card-top-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.opc-card-title {
    font-size: 12px;
    font-weight: 600;
    color: #1f2937;
    margin: 0;
}

.opc-card-badge {
    font-size: 9.5px;
    font-weight: 500;
    padding: 1px 5px;
    border-radius: 3px;
    background: #f3f4f6;
    color: #4b5563;
}

.opc-card-badge.rec {
    background: #dcfce7;
    color: #15803d;
}

.opc-card-desc {
    font-size: 10.5px;
    color: #6b7280;
    margin: 2px 0 0;
    line-height: 1.3;
}

/* Color Scheme Dots */
.opc-color-dots {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
}

.opc-color-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    display: inline-block;
    border: 1px solid rgba(0, 0, 0, 0.15);
}

.opc-dot-blue {
    background: #204e7f;
}

.opc-dot-blue-sec {
    background: #007bff;
}

.opc-dot-teal {
    background: #054f34;
}

.opc-dot-teal-sec {
    background: #14b8a6;
}

.opc-dot-purple {
    background: #5a2d82;
}

.opc-dot-purple-sec {
    background: #8b5cf6;
}

.opc-dot-green {
    background: #166534;
}

.opc-dot-green-sec {
    background: #22c55e;
}

/* ==========================================================================
   8. Toggle Switch Rows (Section 5: Display Icons)
   ========================================================================== */
.opc-toggle-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.opc-toggle-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 9px 10px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 5px;
    transition: background 0.15s ease;
}

.opc-toggle-item:hover {
    background: #f3f4f6;
}

.opc-toggle-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.opc-toggle-thumb {
    width: 34px;
    height: 34px;
    border-radius: 4px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.opc-toggle-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.opc-toggle-details h5 {
    margin: 0;
    font-size: 12px;
    font-weight: 600;
    color: #1f2937;
}

.opc-toggle-details p {
    margin: 1px 0 0;
    font-size: 10.5px;
    color: #6b7280;
    line-height: 1.25;
}

/* Simple, Clean Toggle Switch */
.opc-switch {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 20px;
    flex-shrink: 0;
    margin: 0;
    cursor: pointer;
}

.opc-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.opc-switch-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: #d1d5db;
    transition: 0.2s ease;
    border-radius: 20px;
}

.opc-switch-slider::before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: #ffffff;
    transition: 0.2s ease;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.opc-switch input:checked+.opc-switch-slider {
    background-color: var(--opc-theme-primary, #204e7f);
}

.opc-switch input:checked+.opc-switch-slider::before {
    transform: translateX(18px);
}

/* ==========================================================================
   9. Panel Footer Actions (Clean, Premium & Theme-Cohesive)
   ========================================================================== */
.opc-demo-footer {
    padding: 13px 18px;
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
    box-shadow: 0 -3px 10px rgba(0, 0, 0, 0.03);
}

.opc-btn-reset {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 9px 16px;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.opc-btn-reset i {
    font-size: 12px;
    color: #64748b;
    transition: transform 0.2s ease, color 0.15s ease;
}

.opc-btn-reset:hover {
    background: #e2e8f0;
    color: #0f172a;
    border-color: #94a3b8;
}

.opc-btn-reset:hover i {
    color: #0f172a;
    transform: rotate(-30deg);
}

.opc-btn-reset:active {
    background: #cbd5e1;
    transform: translateY(1px);
}

.opc-btn-apply {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 18px;
    font-size: 13px;
    font-weight: 600;
    color: #ffffff !important;
    background: var(--opc-theme-primary, #204e7f);
    border: 1px solid var(--opc-theme-primary, #204e7f);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.15s ease;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
}

.opc-btn-apply i {
    font-size: 12px;
}

.opc-btn-apply:hover {
    background: var(--opc-theme-primary-hover, #173b61);
    border-color: var(--opc-theme-primary-hover, #173b61);
    color: #ffffff !important;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.16);
    transform: translateY(-1px);
}

.opc-btn-apply:active {
    transform: translateY(1px);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* ==========================================================================
   10. Toast Notification (Minimal Dark Pill)
   ========================================================================== */
.opc-demo-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(30px);
    background: #1f2937;
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 4px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
    font-size: 12px;
    font-weight: 500;
    z-index: 100005;
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.opc-demo-toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

.opc-toast-icon {
    font-size: 11px;
    color: #22c55e;
}

/* ==========================================================================
   11. Real-time CSS Overrides for Toggles
   ========================================================================== */
body.opc-hide-group-icons .product-group-boxes .icon,
body.opc-hide-group-icons .product-group-slider .icon,
body.opc-hide-group-icons .productgrp-icon,
body.opc-hide-group-icons .choose-plan-wrapper .product-dropdown-box .icon {
    display: none !important;
}

body.opc-hide-group-icons .product-group-boxes .product-card {
    padding-left: 15px !important;
}

body.opc-hide-product-icons .product_img,
body.opc-hide-product-icons .plan-header .product_img,
body.opc-hide-product-icons .intel_box .product_heading .product_img,
body.opc-hide-product-icons .product-card-new .plan-header .product_img,
body.opc-hide-product-icons .op-heading-row .order-row>img:first-child,
body.opc-hide-product-icons .wgs-accordian-cls .order-row>img:first-child {
    display: none !important;
}

body.opc-hide-summary-icons .wgs-accordian-cls .order-row>img:not(.wgsrem),
body.opc-hide-summary-icons .wgs-accordian-cls img.wgs-summary-icon,
body.opc-hide-summary-icons .accordion-heading img:not(.wgsrem),
body.opc-hide-summary-icons .order-summary-sidebar img,
body.opc-hide-summary-icons .right-money-back img,
body.opc-hide-summary-icons .viewcart-table td.product-name img,
body.opc-hide-summary-icons .wgsBillingSummary img {
    display: none !important;
}

/* ==========================================================================
   12. Responsive (Mobile)
   ========================================================================== */
@media (max-width: 576px) {
    .opc-demo-panel {
        width: 100vw;
        max-width: 100vw;
    }

    .opc-demo-trigger {
        top: auto;
        bottom: 80px;
        padding: 9px 12px;
        font-size: 13px;
        gap: 7px;
    }

    .opc-trigger-icon {
        font-size: 14px;
    }

    .opc-trigger-badge {
        font-size: 13px;
    }

    .opc-trigger-dot {
        width: 8px;
        height: 8px;
    }
}