/* TV Frame Configurator Specific Styles */

/* Input with unit inline */
.tv-input-with-unit {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tv-input-with-unit input {
    flex: 0 0 90%;
    max-width: 90%;
}

.tv-input-with-unit .unit-label {
    flex: 0 0 10%;
    font-weight: 500;
    white-space: nowrap;
}

/* Single field row (50% width) */
.tv-input-single .tv-input-with-unit input {
    flex: 0 0 90%;
    max-width: none;
}

/* Mobile: full width inputs */
@media (max-width: 768px) {
    .tv-input-with-unit input {
        flex: 1;
        max-width: none;
    }
    
    .tv-dimensions {
        flex-direction: column;
        gap: 15px;
    }
    
    .tv-input-with-unit {
        max-width: 100% !important;
    }
    
    .tv-input-single .tv-input-with-unit {
        max-width: 100% !important;
    }
}

.tv-dimensions {
    display: flex;
    gap: 20px;
}

.tv-dimensions > div {
    flex: 1;
}

.tv-dimensions label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.sensor-location-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-top: 15px;
}

/* Mobile: 2 per row */
@media (max-width: 768px) {
    .sensor-location-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.sensor-option {
    text-align: center;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.sensor-option:hover {
    border-color: #000;
}

.sensor-option input[type="radio"]:checked ~ span {
    font-weight: 600;
}

/* Color Swatches for TV Frames */
.frame-color-swatches {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: flex-start;
}

.frame-color-swatch {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    padding: 8px 4px;
    border-radius: 6px;
    transition: all 0.15s;
    width: 60px;
    box-sizing: border-box;
}

.frame-color-swatch:hover {
    background: #f5f5f5;
}

.frame-color-swatch .color-circle {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #ddd;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
}

.frame-color-swatch.selected .color-circle {
    border-color: #000;
    border-width: 2px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    transform: scale(1.1);
}

.frame-color-swatch .color-name {
    font-size: 11px;
    color: #666;
    text-align: center;
    max-width: 60px;
    word-wrap: break-word;
    line-height: 1.2;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.frame-color-swatch.selected .color-name {
    color: #000;
    font-weight: 500;
}

/* Fix quantity/button layout for new structure */
.tv-frame-configurator .frame-add-to-cart-section {
    display: block !important;
    width: 100% !important;
}

.tv-frame-configurator .frame-quantity-inline {
    flex: 1 !important;
    min-width: auto !important;
    width: 100% !important;
    display: block !important;
}

.tv-frame-configurator .frame-quantity-inline > div {
    width: 100% !important;
}

/* Match quantity input height to button height */
.frame-qty-input {
    height: 52px !important;
    border-radius: 26px !important;
    padding: 0 16px !important;
}

/* Center align quantity input and button vertically */
.tv-frame-configurator .frame-quantity-inline > div {
    align-items: center !important;
}

/* Remove margin-top from button when in inline layout */
.tv-frame-configurator .frame-quantity-inline .frame-btn-add {
    margin-top: 0 !important;
}
