/* Base Reset */
.wcic-trigger-card,
.wcic-sidebar,
.wcic-sidebar * {
    box-sizing: border-box;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

:root {
    --wcic-primary: #d32f2f;
    --wcic-dark: #111;
    --wcic-light: #f9f9f9;
    --wcic-border: #eee;
}

/* -------------------------------------
   Trigger Card (The Button on Page)
-------------------------------------- */
.wcic-trigger-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-left: 4px solid var(--wcic-primary);
    /* Accent */
    border-radius: 8px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
    margin: 20px 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.wcic-trigger-card.wcic-loading {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.wcic-trigger-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.wcic-trigger-card.wcic-loading:hover {
    transform: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.wcic-trigger-info h4 {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--wcic-dark);
}

.wcic-trigger-info p {
    margin: 0;
    font-size: 13px;
    color: #666;
}

.wcic-trigger-status {
    font-style: italic;
}

.wcic-trigger-icon svg {
    width: 40px;
    height: 40px;
}

/* -------------------------------------
   Sidebar
-------------------------------------- */
.wcic-sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 99998;
    backdrop-filter: blur(3px);
    display: none;
}

.wcic-sidebar {
    position: fixed;
    top: 0;
    right: -450px;
    width: 400px;
    max-width: 90%;
    height: 100%;
    background: #fff;
    z-index: 99999;
    transition: right 0.4s cubic-bezier(0.19, 1, 0.22, 1);
    display: flex;
    flex-direction: column;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.2);
}

.wcic-sidebar.open {
    right: 0;
}

/* Header */
.wcic-sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wcic-sidebar-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--wcic-dark);
}

.wcic-close-btn {
    background: transparent;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #999;
    line-height: 1;
}

.wcic-close-btn:hover {
    color: var(--wcic-primary);
}

/* Content Scroll */
.wcic-sidebar-content {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
}

/* Tabs */
.wcic-tabs {
    display: flex;
    background: #f5f5f5;
    padding: 4px;
    border-radius: 8px;
    margin-bottom: 24px;
}

.wcic-tab {
    flex: 1;
    text-align: center;
    padding: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #777;
    border-radius: 6px;
    cursor: pointer;
}

.wcic-tab.active {
    background: #fff;
    color: var(--wcic-dark);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Section Labels */
.wcic-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    color: #999;
    margin-bottom: 10px;
    letter-spacing: 1px;
}

/* Providers */
.wcic-providers-grid {
    display: flex;
    gap: 12px;
    margin-bottom: 30px;
}

.wcic-provider-card {
    flex: 1;
    border: 1px solid #eee;
    border-radius: 12px;
    height: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
    /* For selection checkmark if needed */
}

.wcic-provider-card img {
    max-height: 90px;
    max-width: 90%;
    transition: filter 0.2s;
}

.wcic-provider-card:hover {
    border-color: #ccc;
}

.wcic-provider-card.active {
    border: 2px solid var(--wcic-dark);
    background: #fff;
}

/* Durations */
.wcic-durations-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 40px;
}

.wcic-duration-btn {
    border: 1px solid #eee;
    background: #fff;
    border-radius: 8px;
    padding: 15px 5px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.wcic-duration-btn .num {
    display: block;
    font-size: 18px;
    font-weight: 800;
    color: var(--wcic-dark);
    margin-bottom: 2px;
}

.wcic-duration-btn .txt {
    font-size: 11px;
    color: #888;
    text-transform: uppercase;
    font-weight: 600;
}

.wcic-duration-btn.active {
    background: var(--wcic-primary);
    border-color: var(--wcic-primary);
}

.wcic-duration-btn.active .num,
.wcic-duration-btn.active .txt {
    color: #fff;
}

/* -------------------------------------
   Result Box ("Tempting" Design)
-------------------------------------- */
.wcic-result-container {
    padding-top: 10px;
    /* Reserve space to prevent layout jump but better to animate */
    min-height: 120px;
}

.wcic-result-box {
    background: #fff;
    border: 2px dashed var(--wcic-primary);
    /* Dashed red border = Coupon/Offer feel */
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
    animation: fadeInScale 0.4s ease forwards;
}

.wcic-result-box::before {
    content: 'OFFER';
    position: absolute;
    top: 10px;
    right: -25px;
    background: var(--wcic-primary);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 4px 30px;
    transform: rotate(45deg);
}

.wcic-res-label {
    font-size: 14px;
    color: #666;
    margin-bottom: 8px;
}

.wcic-res-value {
    font-size: 42px;
    font-weight: 900;
    color: var(--wcic-primary);
    line-height: 1;
    margin-bottom: 4px;
}

.wcic-res-currency {
    font-size: 20px;
    font-weight: 600;
    vertical-align: top;
    margin-left: 2px;
}

.wcic-res-duration {
    font-size: 13px;
    color: #999;
    font-weight: 500;
}

/* Triple 0 Styles */
.wcic-triple-zero {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
    animation: fadeIn 0.3s ease-in-out;
}

.wcic-t0-item {
    text-align: center;
    display: flex;
    flex-direction: column;
}

.wcic-t0-val {
    font-size: 16px;
    font-weight: 800;
    color: #2e7d32;
    /* Green for "Good Deal" */
}

.wcic-t0-lbl {
    font-size: 10px;
    color: #888;
    text-transform: uppercase;
    font-weight: 600;
}


.wcic-res-error {
    color: var(--wcic-primary);
    background: #fff0f0;
    padding: 15px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    display: none;
    text-align: center;
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        margin-top: 10px
    }

    to {
        opacity: 1;
        margin-top: 20px
    }
}

@media (max-width: 480px) {
    .wcic-sidebar {
        right: -100%;
        width: 100%;
    }
}