/* WC Configurator Shortcode Styles */


/* Component Selector */
.wcc-component-selector {
    margin-bottom: 20px;
}

.wcc-component-label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

/* Select Dropdown for Rings */
.wcc-component-select-wrapper {
    margin-bottom: 15px;
}

.wcc-component-select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background-color: #fff;
    font-size: 16px;
    line-height: 1.4;
    color: #333;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 12px center;
    background-repeat: no-repeat;
    background-size: 16px;
    padding-right: 45px;
}

.wcc-component-select:focus {
    outline: none;
    border-color: #FFC943;
    box-shadow: 0 0 0 3px rgba(255, 201, 67, 0.1);
}

.wcc-component-select:hover {
    border-color: #999;
}

/* Radio Button Options for Drivers */
.wcc-component-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wcc-shortcode-configurator {
    font-family: inherit;
    max-width: 100%;
    font-size: 0.95rem;
    line-height: 1.5;
}

.wcc-components-section h3 {
    font-size: 1.3em;
    margin-bottom: 5px!important;
}

/* WooCommerce Gallery Loading States (for existing page gallery) */
.woocommerce-product-gallery.wcc-gallery-loading {
    opacity: 0.7;
    pointer-events: none;
    position: relative;
}

.woocommerce-product-gallery.wcc-gallery-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #333;
    border-radius: 50%;
    animation: wcc-gallery-spin 1s linear infinite;
    z-index: 999;
}

@keyframes wcc-gallery-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Components Section */
.wcc-components-section {
    margin-bottom: 30px;
}

.wcc-components-section h3 {
    margin-bottom: 20px;
    color: #333;
    font-size: 1.5em;
}

/* Component Display (LED Spot) */
.wcc-component-display {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 20px;
}

.wcc-component-display label {
    font-weight: bold;
    color: #555;
    margin: 0;
}

.wcc-spot-name {
    flex: 1;
    font-size: 1.1em;
}

.wcc-spot-price {
    font-weight: bold;
    color: #27ae60;
}

/* Component Selector */
.wcc-component-selector {
    margin-bottom: 25px;
}

.wcc-component-label {
    display: block;
    font-weight: bold;
    margin-bottom: 10px;
    color: #555;
}

.wcc-component-options {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.wcc-component-selector[data-component="driver"] .wcc-component-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
}

@media (min-width: 1024px) {
    .wcc-component-selector[data-component="driver"] .wcc-component-options {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.wcc-component-option {
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.wcc-component-option:hover {
    border-color: #ddd;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.wcc-component-option.selected {
    border-color: #2D3E7C;
    background-color: #f0f8ff;
}

.wcc-component-option label {
    display: block;
    padding: 12px 15px;
    margin: 0;
    cursor: pointer;
    width: 100%;
}

.wcc-component-option input[type="radio"] {
    margin-right: 10px;
}

.wcc-option-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.wcc-option-name {
    flex: 1;
    font-size: 1em;
}

.wcc-option-price {
    font-weight: bold;
    color: #27ae60;
}

.wcc-builtin-label {
    color: #666;
    font-style: italic;
}

.wcc-default-badge {
    background: #FFC943;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8em;
    font-weight: bold;
}

/* Horizontal Layout */
.wcc-component-selector[data-layout="horizontal"] .wcc-component-options {
    flex-direction: row;
    flex-wrap: wrap;
}

.wcc-component-selector[data-layout="horizontal"] .wcc-component-option {
    flex: 1;
    min-width: 200px;
}

/* Price Section */
.wcc-price-section {
    margin-bottom: 30px;
}

.wcc-price-display {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
}

.wcc-summary-bar {
    display: flex;
    align-items: stretch;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 25px;
}

.wcc-summary-bar > .wcc-add-to-cart-section {
    width: 100%;
}

.wcc-price-breakdown {
    margin-bottom: 15px;
}

.wcc-price-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.wcc-price-label {
    color: #666;
}

.wcc-price-value {
    font-weight: bold;
    color: #27ae60;
}

.wcc-total-price-display {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.2em;
    padding-top: 15px;
    border-top: 2px solid #e1e8ed;
}

.wcc-total-label {
    font-weight: bold;
    color: #333;
}

.wcc-total-price {
    font-weight: bold;
    color: #2D3E7C;
    font-size: 1.3em;
}

/* Cart Section */
.wcc-cart-section {
    margin-bottom: 20px;
}

.wcc-add-to-cart-section {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 25px;
    flex-wrap: wrap;
}

.wcc-quantity-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.wcc-quantity-section label {
    font-weight: bold;
    margin: 0;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.wcc-quantity-control {
    display: inline-flex;
    align-items: stretch;
    border: 2px solid #e1e8ed;
    border-radius: 6px;
    overflow: hidden;
    background: #fff;
}

.wcc-quantity-input {
    width: 72px;
    border: none;
    border-left: 1px solid #e1e8ed;
    border-right: 1px solid #e1e8ed;
    text-align: center;
    font-size: 1.1em;
    font-weight: 600;
    height: 48px;
}

.wcc-quantity-input:focus {
    outline: none;
}

.wcc-qty-btn {
    width: 48px;
    height: 48px;
    border: none;
    background: #eef1f6;
    font-size: 1.4em;
    font-weight: 600;
    color: #2D3E7C;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.wcc-qty-btn:hover {
    background: #dfe4ef;
}

.wcc-add-to-cart-btn {
    color: #F4F4F5 !important;
    border-color: #2D3E7C!important;
    font-size: 18px!important;
    font-family: 'Outfit', Helvetica, Arial, Lucida, sans-serif !important;
    background-color: #2D3E7C !important;
    padding-top: 12px !important;
    padding-bottom: 12px !important;
    border: 2px solid!important;
    border-radius: 3px!important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: auto 0;
}

.wcc-add-to-cart-btn:hover {
    background: #005a87;
}

.wcc-add-to-cart-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.wcc-inline-price-wrapper {
    display: flex;
    align-items: center;
    min-width: 160px;
    flex: 0 1 auto;
    gap: 10px;
}

.wcc-quantity-section,
.wcc-inline-price-wrapper,
.wcc-add-to-cart-btn {
    flex: 0 1 auto;
}

.wcc-price-inline {
    display: inline-flex;
    flex-direction: column;
    gap: 4px;
}

.wcc-inline-label {
    font-weight: bold;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #2d2d2d;
}

.wcc-inline-price {
    font-size: 1.5em;
    font-weight: 700;
    color: #2D3E7C;
}

/* Messages */
.wcc-messages {
    margin: 15px 0;
    padding: 15px;
    border-radius: 6px;
    font-weight: bold;
}

.wcc-messages.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.wcc-messages.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Responsive Design */
@media (max-width: 768px) {
    .wcc-summary-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .wcc-add-to-cart-section {
        flex-direction: column;
        align-items: stretch;
    }

    .wcc-component-selector[data-component="driver"] .wcc-component-options {
        grid-template-columns: 1fr;
    }

    .wcc-component-display {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .wcc-component-selector[data-layout="horizontal"] .wcc-component-options {
        flex-direction: column;
    }
    
    .wcc-add-to-cart-btn,
    .wcc-quantity-control,
    .wcc-inline-price-wrapper {
        width: 100%;
    }
}

/* Divi Integration */
.et_pb_module .wcc-shortcode-configurator {
    font-family: inherit;
}

.et_pb_text .wcc-shortcode-configurator,
.et_pb_code .wcc-shortcode-configurator {
    margin-top: 0;
    margin-bottom: 0;
}

/* Theme compatibility */
.wcc-shortcode-configurator * {
    box-sizing: border-box;
}

.wcc-shortcode-configurator input,
.wcc-shortcode-configurator button {
    font-family: inherit;
}
