/* ==========================================================================
   CALCULATOR DASHBOARD DESIGN - SEGMENTED CONTROLS VERSION
   ========================================================================== */

.ts-calculator-design-dashboard {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 50px;
    align-items: start;
}

.ts-config-panel-dashboard {
    position: relative;
    padding: 2rem;
    border-radius: 20px;
    overflow: visible;
    isolation: isolate;
    background: linear-gradient(160deg, rgba(30,30,30,0.6) 0%, rgba(10,10,10,0.8) 100%);
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px);
}

.ts-config-panel-dashboard::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
}

.ts-price-card-dashboard {
    position: sticky;
    top: 140px;
    padding: 2rem;
    border-radius: 20px;
    overflow: hidden;
    isolation: isolate;
    background: linear-gradient(160deg, rgba(30,30,30,0.7) 0%, rgba(10,10,10,0.9) 100%);
    border: 1px solid rgba(232, 67, 147, 0.3);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
}

.ts-price-card-dashboard::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at top right, rgba(232, 67, 147, 0.1), transparent 60%);
    pointer-events: none;
}

.ts-panel-header {
    margin-bottom: 1.25rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ts-panel-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--ts-white);
}

.ts-panel-title svg {
    color: #e84393;
    width: 20px;
    height: 20px;
}

/* Input rows */
.ts-input-row-dashboard {
    margin-bottom: 1rem;
}

/* Grid container for sliders - 2 columns */
.ts-sliders-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.ts-input-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--ts-silver);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
}

.ts-slider-track-dashboard {
    margin: 0.5rem 0;
}

.ts-input-value-dashboard {
    text-align: center;
    font-size: 1.25rem;
    font-weight: 700;
    color: #e84393;
    margin-top: 0.25rem;
}

/* ==========================================================================
   SEGMENTED CONTROLS
   ========================================================================== */

.ts-segmented-group {
    margin-bottom: 1.25rem;
}

.ts-segmented-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--ts-silver);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
}

/* Default: Flex row for 2-4 options */
.ts-segmented-control {
    display: flex;
    position: relative;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 12px;
    padding: 4px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    gap: 4px;
}

/* The sliding indicator - HIDDEN (using individual backgrounds instead for consistency) */
.ts-segmented-indicator {
    display: none;
}

.ts-segment-option {
    flex: 1;
    position: relative;
    z-index: 2;
}

.ts-segment-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}

.ts-segment-option label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 0.5rem;
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-align: center;
    min-height: 54px;
    /* ADD VISIBLE CONTAINER FOR ALL OPTIONS */
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* Selected state - override with pink */
.ts-segment-option input[type="radio"]:checked + label {
    background: linear-gradient(135deg, #e84393, #d63384);
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(232, 67, 147, 0.4);
}

.ts-segment-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--ts-silver);
    transition: color 0.3s ease;
    line-height: 1.2;
}

.ts-segment-price {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 2px;
    transition: color 0.3s ease;
}

/* Selected state */
.ts-segment-option input[type="radio"]:checked + label .ts-segment-title {
    color: #fff;
}

.ts-segment-option input[type="radio"]:checked + label .ts-segment-price {
    color: rgba(255, 255, 255, 0.9);
}

/* Hover state for non-selected */
.ts-segment-option:not(:has(input:checked)) label:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

.ts-segment-option:not(:has(input:checked)) label:hover .ts-segment-title {
    color: var(--ts-white);
}

/* ==========================================================================
   GRID LAYOUT - For 5+ options (2 rows × 3 columns)
   ========================================================================== */

.ts-segmented-control.ts-segmented-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
}

/* 2 columns variant */
.ts-segmented-control.ts-segmented-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
}

/* ==========================================================================
   PRICE SECTION
   ========================================================================== */

.ts-price-section-dashboard {
    position: relative;
    z-index: 2;
}

.ts-price-tag {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--ts-silver);
    margin-bottom: 0.75rem;
}

.ts-price-big {
    font-size: 2.75rem;
    font-weight: 700;
    color: var(--ts-white);
    font-family: 'Courier New', monospace;
    text-shadow: 0 0 20px rgba(232, 67, 147, 0.6);
    margin-bottom: 0.5rem;
}

.ts-price-euro {
    font-size: 1.5rem;
    color: #e84393;
}

.ts-price-vat {
    font-size: 0.7rem;
    color: var(--ts-silver);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1.25rem;
}

.ts-price-details-dashboard {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.ts-price-line {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    color: var(--ts-silver);
    margin: 0.6rem 0;
    font-size: 0.85rem;
}

.ts-price-line span {
    flex: 1;
    padding-right: 0.75rem;
}

.ts-price-line strong {
    color: var(--ts-white);
    white-space: nowrap;
}

.ts-price-line.ts-price-total {
    font-size: 1rem;
    font-weight: 600;
    padding-top: 0.6rem;
    margin-top: 0.6rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Stats grid */
.ts-stats-grid-dashboard {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    margin-top: 1.25rem;
}

.ts-stat-box {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 0.85rem;
    text-align: center;
}

.ts-stat-value {
    font-size: 1.15rem;
    font-weight: 700;
    color: #e84393;
    margin-bottom: 0.35rem;
}

.ts-stat-label {
    font-size: 0.65rem;
    color: var(--ts-silver);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Action buttons */
.ts-calculator-actions {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-top: 1.25rem;
}

.ts-calculator-actions .ts-btn {
    width: 100%;
    padding: 0.85rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.ts-btn-primary {
    background: linear-gradient(135deg, #e84393, #d63384);
    color: white;
    box-shadow: 0 4px 15px rgba(232, 67, 147, 0.4);
}

.ts-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(232, 67, 147, 0.6);
}

.ts-btn-outline {
    background: transparent;
    color: var(--ts-white);
    border: 2px solid #e84393;
}

.ts-btn-outline:hover {
    background: rgba(232, 67, 147, 0.1);
}

/* Range slider */
.ts-range-input {
    -webkit-appearance: none;
    appearance: none;
    width: 100%;
    height: 5px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
    margin: 0.75rem 0;
    cursor: pointer;
}

.ts-range-input::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #e84393;
    border: 2px solid rgba(255,255,255,0.8);
    cursor: pointer;
    box-shadow: 0 0 10px rgba(232, 67, 147, 0.6);
    transition: all 0.3s ease;
}

.ts-range-input::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #e84393;
    border: 2px solid rgba(255,255,255,0.8);
    cursor: pointer;
    box-shadow: 0 0 10px rgba(232, 67, 147, 0.6);
}

.ts-range-input::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 0 15px rgba(232, 67, 147, 0.8);
}

/* ==========================================================================
   MOUNTING OPTIONS - GRID SPECIFIC TWEAKS
   ========================================================================== */

/* Slightly taller for mounting options with prices */
.ts-segmented-control.ts-segmented-grid-2 .ts-segment-option label {
    min-height: 70px;
}

/* Mounting option title - slightly smaller for longer text */
.ts-segmented-control.ts-segmented-grid-2 .ts-segment-title {
    font-size: 0.75rem;
    line-height: 1.3;
    word-break: break-word;
    hyphens: auto;
}

/* Price display - reserve space */
.ts-segmented-control.ts-segmented-grid-2 .ts-segment-price {
    min-height: 1em;
}

/* 3-column grid variant */
.ts-segmented-control.ts-segmented-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
}

.ts-segmented-control.ts-segmented-grid-3 .ts-segment-option label {
    min-height: 65px;
}

.ts-segmented-control.ts-segmented-grid-3 .ts-segment-title {
    font-size: 0.7rem;
}

/* ==========================================================================
   RESPONSIVE ADJUSTMENTS FOR CALCULATOR
   ========================================================================== */

@media (max-width: 1200px) {
    .ts-calculator-design-dashboard {
        gap: 30px;
    }
}

@media (max-width: 992px) {
    .ts-calculator-design-dashboard {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .ts-price-card-dashboard {
        position: static;
    }
}

@media (max-width: 640px) {
    .ts-sliders-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .ts-segmented-control.ts-segmented-grid-2,
    .ts-segmented-control.ts-segmented-grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .ts-config-panel-dashboard,
    .ts-price-card-dashboard {
        padding: 1.25rem;
    }
}

/* ==========================================================================
   TOOLTIP STYLES
   ========================================================================== */

.ts-tooltip {
    position: absolute;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.95);
    color: var(--ts-white, #ffffff);
    font-size: 0.8rem;
    font-weight: 400;
    line-height: 1.4;
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid rgba(232, 67, 147, 0.3);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    max-width: 250px;
    text-align: center;
    pointer-events: none;
    opacity: 0;
    visibility: hidden;
    transform: translateX(-50%) translateY(5px);
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}

.ts-tooltip.active {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Tooltip arrow */
.ts-tooltip::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid rgba(0, 0, 0, 0.95);
}

/* Indicate tooltips are available */
[data-tooltip] {
    cursor: help;
}

/* Subtle indicator for options with tooltips */
[data-tooltip] label::after {
    content: '';
    position: absolute;
    top: 6px;
    right: 6px;
    width: 5px;
    height: 5px;
    background: rgba(232, 67, 147, 0.5);
    border-radius: 50%;
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

[data-tooltip]:hover label::after {
    opacity: 1;
}

/* Mobile tooltip adjustments */
@media (max-width: 640px) {
    .ts-tooltip {
        font-size: 0.75rem;
        padding: 8px 12px;
        max-width: 200px;
    }
}