/* CS16 Panel — Owner Slot Discount Settings */

#v10PricingPanelContent {
    min-width: 0;
}

.cs-discount-card {
    --cs-discount-accent: var(--v10-red-hot, var(--tpl-accent, #4f8dff));
    --cs-discount-positive: #45d88a;
    --cs-discount-warning: #ffc45f;
    --cs-discount-danger: #ff6677;
    overflow: hidden;
}

.cs-discount-status-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 11px;
}

.cs-discount-status-grid article {
    min-width: 0;
    padding: 15px;
    border: 1px solid var(--v10-line);
    border-radius: 11px;
    background: color-mix(in srgb, var(--v10-card-alt) 88%, transparent);
}

.cs-discount-status-grid span,
.cs-discount-status-grid strong,
.cs-discount-status-grid small {
    display: block;
}

.cs-discount-status-grid span {
    color: var(--v10-muted);
    font: 900 9px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    letter-spacing: 0.85px;
}

.cs-discount-status-grid strong {
    margin-top: 8px;
    overflow: hidden;
    color: var(--v10-text);
    font-size: 13px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cs-discount-status-grid strong[data-state="active"] {
    color: var(--cs-discount-positive);
}

.cs-discount-status-grid strong[data-state="scheduled"] {
    color: var(--cs-discount-warning);
}

.cs-discount-status-grid strong[data-state="ended"] {
    color: var(--cs-discount-danger);
}

.cs-discount-status-grid strong[data-state="unconfigured"] {
    color: var(--v10-muted);
}

.cs-discount-status-grid strong[data-state="draft"] {
    color: var(--cs-discount-accent);
}

.cs-discount-status-grid small {
    margin-top: 5px;
    overflow: hidden;
    color: var(--v10-muted);
    font-size: 9px;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#csDiscountForm {
    margin-top: 17px;
}

.cs-discount-enable-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-width: 0;
    padding: 15px;
    border: 1px solid color-mix(in srgb, var(--cs-discount-accent) 27%, var(--v10-line));
    border-radius: 12px;
    background: color-mix(in srgb, var(--cs-discount-accent) 6%, var(--v10-card-alt));
}

.cs-discount-enable-row strong,
.cs-discount-enable-row > div > span {
    display: block;
}

.cs-discount-enable-row strong {
    color: var(--v10-text);
    font-size: 13px;
}

.cs-discount-enable-row > div > span {
    margin-top: 5px;
    color: var(--v10-muted);
    font-size: 10px;
    line-height: 1.5;
}

.cs-discount-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(330px, 0.72fr);
    gap: 15px;
    min-width: 0;
    margin-top: 15px;
}

.cs-discount-config,
.cs-discount-preview {
    min-width: 0;
    padding: 16px;
    border: 1px solid var(--v10-line);
    border-radius: 12px;
    background: color-mix(in srgb, var(--v10-card-alt) 88%, transparent);
}

.cs-discount-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.cs-discount-section-head h4 {
    margin: 5px 0 0;
    color: var(--v10-text);
    font-size: 14px;
}

.cs-discount-timezone,
.cs-discount-preview-badge {
    display: inline-flex;
    align-items: center;
    min-height: 25px;
    padding: 4px 8px;
    border: 1px solid var(--v10-line);
    border-radius: 999px;
    color: var(--v10-muted);
    font: 900 8px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    letter-spacing: 0.55px;
    white-space: nowrap;
}

.cs-discount-preview-badge[data-state="active"] {
    border-color: color-mix(in srgb, var(--cs-discount-positive) 42%, transparent);
    background: color-mix(in srgb, var(--cs-discount-positive) 9%, transparent);
    color: var(--cs-discount-positive);
}

.cs-discount-preview-badge[data-state="scheduled"] {
    border-color: color-mix(in srgb, var(--cs-discount-warning) 42%, transparent);
    background: color-mix(in srgb, var(--cs-discount-warning) 9%, transparent);
    color: var(--cs-discount-warning);
}

.cs-discount-preview-badge[data-state="ended"] {
    border-color: color-mix(in srgb, var(--cs-discount-danger) 42%, transparent);
    background: color-mix(in srgb, var(--cs-discount-danger) 9%, transparent);
    color: var(--cs-discount-danger);
}

.cs-discount-preview-badge[data-state="unconfigured"] {
    border-style: dashed;
    color: var(--v10-muted);
}

.cs-discount-preview-badge[data-state="draft"] {
    border-color: color-mix(in srgb, var(--cs-discount-accent) 42%, transparent);
    background: color-mix(in srgb, var(--cs-discount-accent) 9%, transparent);
    color: var(--cs-discount-accent);
}

.cs-discount-fields {
    margin-top: 16px;
}

.cs-discount-input-suffix {
    position: relative;
    display: block;
}

.cs-discount-input-suffix input {
    padding-right: 42px !important;
}

.cs-discount-input-suffix b {
    position: absolute;
    right: 14px;
    top: 50%;
    color: var(--cs-discount-accent);
    font: 900 12px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    transform: translateY(-50%);
    pointer-events: none;
}

.cs-discount-usage-meter {
    margin-top: 16px;
    padding: 13px;
    border: 1px solid var(--v10-line);
    border-radius: 10px;
    background: color-mix(in srgb, var(--v10-card) 82%, transparent);
}

.cs-discount-usage-meter > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.cs-discount-usage-meter strong,
.cs-discount-usage-meter > div > span {
    color: var(--v10-text);
    font-size: 10px;
}

.cs-discount-usage-meter > div > span {
    color: var(--v10-muted);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-weight: 800;
}

.cs-discount-meter-track {
    display: block;
    height: 6px;
    margin-top: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: color-mix(in srgb, var(--v10-muted) 18%, transparent);
}

.cs-discount-meter-track i {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(
        90deg,
        color-mix(in srgb, var(--cs-discount-accent) 72%, #fff),
        var(--cs-discount-accent)
    );
    transition: width 0.18s ease;
}

.cs-discount-contract-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 13px;
    padding: 12px;
    border: 1px solid color-mix(in srgb, var(--v10-blue) 25%, transparent);
    border-radius: 10px;
    background: color-mix(in srgb, var(--v10-blue) 5%, transparent);
}

.cs-discount-contract-note > span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--v10-blue) 16%, transparent);
    color: var(--v10-blue);
    font: 900 10px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.cs-discount-contract-note p {
    margin: 1px 0 0;
    color: var(--v10-muted);
    font-size: 10px;
    line-height: 1.55;
}

.cs-discount-contract-note p strong {
    color: var(--v10-text);
}

.cs-discount-slot-sample {
    margin-top: 16px;
}

.cs-discount-price-card {
    margin-top: 14px;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--cs-discount-accent) 34%, #263346);
    border-radius: 13px;
    background: #0b111a;
    color: #eef4fb;
    box-shadow: 0 16px 35px rgba(0, 0, 0, 0.2);
}

.cs-discount-price-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px;
    border-bottom: 1px solid #253247;
    background:
        radial-gradient(circle at 100% 0%, color-mix(in srgb, var(--cs-discount-accent) 20%, transparent), transparent 55%),
        #101925;
}

.cs-discount-price-brand span {
    color: #8998aa;
    font: 900 8px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    letter-spacing: 0.8px;
}

.cs-discount-price-brand strong {
    padding: 6px 9px;
    border-radius: 999px;
    background: var(--cs-discount-accent);
    color: var(--cs16-accent-contrast, #fff);
    font: 900 9px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    letter-spacing: 0.5px;
}

.cs-discount-price-card dl {
    margin: 0;
    padding: 7px 14px;
}

.cs-discount-price-card dl > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 11px 0;
    border-bottom: 1px solid #202c3d;
}

.cs-discount-price-card dl > div:last-child {
    border-bottom: 0;
}

.cs-discount-price-card dt {
    color: #8e9bad;
    font-size: 10px;
}

.cs-discount-price-card dd {
    margin: 0;
    color: #dce6f2;
    font: 800 12px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.cs-discount-price-card .is-saving dd {
    color: #67dfa1;
}

.cs-discount-price-card .is-total {
    padding: 15px 0;
}

.cs-discount-price-card .is-total dt {
    color: #dce6f2;
    font-weight: 800;
}

.cs-discount-price-card .is-total dd {
    color: #fff;
    font-size: 20px;
}

.cs-discount-price-card > p {
    margin: 0;
    padding: 12px 14px;
    border-top: 1px solid #253247;
    background: #0e1621;
    color: #91a0b3;
    font-size: 9px;
    line-height: 1.5;
}

.cs-discount-email-preview {
    margin-top: 13px;
    padding: 13px;
    border: 1px dashed var(--v10-line-strong);
    border-radius: 10px;
    background: color-mix(in srgb, var(--v10-card) 72%, transparent);
}

.cs-discount-email-preview span,
.cs-discount-email-preview strong,
.cs-discount-email-preview p {
    display: block;
}

.cs-discount-email-preview span {
    color: var(--cs-discount-accent);
    font: 900 8px/1 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    letter-spacing: 0.8px;
}

.cs-discount-email-preview strong {
    margin-top: 7px;
    color: var(--v10-text);
    font-size: 12px;
}

.cs-discount-email-preview p {
    margin: 6px 0 0;
    color: var(--v10-muted);
    font-size: 9px;
    line-height: 1.5;
}

.cs-discount-actions {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--v10-line);
}

body.legacy-clean[data-client-color-mode="light"] :is(
    .cs-discount-status-grid article,
    .cs-discount-enable-row,
    .cs-discount-config,
    .cs-discount-preview,
    .cs-discount-usage-meter,
    .cs-discount-email-preview
) {
    background-color: var(--v10-card-alt) !important;
    background-image: none !important;
    color: var(--v10-text) !important;
}

body.legacy-clean[data-client-color-mode="light"] :is(
    .cs-discount-status-grid strong,
    .cs-discount-enable-row strong,
    .cs-discount-section-head h4,
    .cs-discount-usage-meter strong,
    .cs-discount-email-preview strong
) {
    color: var(--v10-text) !important;
}

body.legacy-clean[data-client-color-mode="light"] :is(
    .cs-discount-enable-row > div > span,
    .cs-discount-contract-note p,
    .cs-discount-email-preview p
) {
    color: var(--v10-muted) !important;
}

@media (max-width: 1050px) {
    .cs-discount-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .cs-discount-status-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .cs-discount-layout,
    .cs-discount-status-grid,
    .cs-discount-fields {
        grid-template-columns: 1fr;
    }

    .cs-discount-enable-row,
    .cs-discount-section-head {
        align-items: flex-start;
    }

    .cs-discount-enable-row .v10-switch b {
        display: none;
    }

    .cs-discount-status-grid small,
    .cs-discount-status-grid strong {
        white-space: normal;
    }
}

@media (max-width: 460px) {
    .cs-discount-layout,
    .cs-discount-status-grid,
    .cs-discount-fields {
        grid-template-columns: 1fr;
    }

    .cs-discount-card,
    .cs-discount-config,
    .cs-discount-preview {
        padding: 14px;
    }

    .cs-discount-section-head {
        flex-direction: column;
    }

    .cs-discount-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .cs-discount-price-card .is-total dd {
        font-size: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cs-discount-meter-track i {
        transition: none;
    }
}
