/**
 * WooCommerce Integration Styles
 * Styling for tuning catalog e-commerce features
 * This file uses CSS variables generated from the Avada theme colors.
 */

/* Vehicle Selection Form */
.stc-vehicle-selection {
    background: var(--stc-avada-color-1, #f9f9f9); /* was #f9f9f9 */
    border: 2px solid var(--stc-avada-color-2, #ddd); /* was #ddd */
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
}

.stc-vehicle-selection h3 {
    margin-top: 0;
    color: var(--stc-avada-color-4, #333); /* was #333 */
    border-bottom: 2px solid var(--stc-avada-color-5, #d10a0a); /* was #0073aa */
    padding-bottom: 10px;
}

.stc-vehicle-selection .description {
    color: var(--stc-avada-color-6, #8C8C8C); /* was #666 */
    font-style: italic;
    margin-bottom: 15px;
}

/* Selector Container */
.stc-selector-container {
    margin: 15px 0;
}

.stc-selector-container .stc-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.stc-selector-container .stc-selector-row {
    display: flex;
    flex-direction: column;
}

.stc-selector-container label {
    font-weight: bold;
    margin-bottom: 5px;
    color: var(--stc-avada-color-4, #333); /* was #333 */
}

.stc-selector-container select {
    padding: 8px 12px;
    border: 1px solid var(--stc-avada-color-3, #ccc); /* was #ccc */
    border-radius: 4px;
    font-size: 14px;
    min-height: 40px;
}

.stc-selector-container select:focus {
    border-color: var(--stc-avada-color-5, #d10a0a); /* was #0073aa */
    outline: none;
    box-shadow: 0 0 5px rgba(209, 10, 10, 0.3); /* was rgba(0, 115, 170, 0.3) */
}

/* ECU Field */
.stc-ecu-field {
    background: #fff;
    border: 1px solid var(--stc-avada-color-2, #e1e1e1); /* was #e1e1e1 */
    border-radius: 4px;
    padding: 15px;
    margin-top: 20px;
}

.stc-ecu-field label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    color: var(--stc-avada-color-4, #333); /* was #333 */
}

.stc-ecu-field .description {
    font-size: 13px;
    color: var(--stc-avada-color-6, #8C8C8C); /* was #666 */
    margin-bottom: 10px;
}

.stc-ecu-field textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--stc-avada-color-3, #ccc); /* was #ccc */
    border-radius: 4px;
    font-family: inherit;
    resize: vertical;
    min-height: 80px;
}

.stc-ecu-field textarea:focus {
    border-color: var(--stc-avada-color-5, #d10a0a); /* was #0073aa */
    outline: none;
    box-shadow: 0 0 5px rgba(209, 10, 10, 0.3); /* was rgba(0, 115, 170, 0.3) */
}

/* Add to Cart Button States */
.single_add_to_cart_button.disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background-color: var(--stc-avada-color-3, #ccc) !important; /* was #ccc */
}

.single_add_to_cart_button:not(.disabled) {
    background-color: var(--stc-avada-color-7, #1a222a); /* was #0073aa */
    border-color: var(--stc-avada-color-7, #1a222a); /* was #0073aa */
}

/* Tuning Products Grid */
.stc-tuning-products {
    margin: 30px 0;
}

.stc-tuning-products h2 {
    border-bottom: 3px solid var(--stc-avada-color-5, #d10a0a); /* was #0073aa */
    padding-bottom: 10px;
    color: var(--stc-avada-color-4, #333); /* was #333 */
}

/* Add-on Products Grid */
.stc-addon-products {
    margin: 30px 0;
}

.stc-addon-products h2 {
    grid-column: 1 / -1;
    border-bottom: 3px solid var(--stc-avada-color-5, #d10a0a); /* was #0073aa */
    padding-bottom: 10px;
    color: var(--stc-avada-color-4, #333); /* was #333 */
    margin-bottom: 20px;
}

.stc-addon-product {
    background: #fff;
    border: 1px solid var(--stc-avada-color-2, #e1e1e1); /* was #e1e1e1 */
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.stc-addon-product:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.stc-addon-product h3 {
    margin-top: 0;
    color: var(--stc-avada-color-4, #333); /* was #333 */
    font-size: 18px;
}

.stc-addon-product p {
    color: var(--stc-avada-color-6, #8C8C8C); /* was #666 */
    margin: 10px 0;
}

.stc-addon-product .price {
    font-size: 20px;
    font-weight: bold;
    color: var(--stc-avada-color-7, #1a222a); /* was #0073aa */
    margin: 15px 0;
}

.stc-addon-product .button {
    background-color: var(--stc-avada-color-7, #1a222a); /* was #0073aa */
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 4px;
    display: inline-block;
    transition: background-color 0.2s;
}

.stc-addon-product .button:hover {
    background-color: var(--stc-avada-primary, #000000); /* was #005a87 */
}

/* Discount Notices */
.discount-notice {
    background: var(--stc-avada-color-1, #f8f8f8); /* was #d4edda */
    border: 1px solid var(--stc-avada-color-2, #e0e0e0); /* was #c3e6cb */
    color: var(--stc-avada-color-8, #2b2b2b); /* was #155724 */
    padding: 10px;
    border-radius: 4px;
    margin-top: 10px;
    font-weight: bold;
    text-align: center;
}

.stc-discount {
    color: var(--stc-avada-color-7, #1a222a); /* was #28a745 */
    font-weight: bold;
}

/* Cart Item Data */
.wc-item-meta {
    margin-top: 10px;
}

.wc-item-meta-label {
    font-weight: bold;
    color: var(--stc-avada-color-4, #333); /* was #333 */
}

.wc-item-meta-value {
    color: var(--stc-avada-color-6, #8C8C8C); /* was #666 */
}

/* Year Range Indicators */
.year-range {
    background: var(--stc-avada-color-7, #1a222a); /* was #0073aa */
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Product Variations */
.variations {
    margin: 20px 0;
}

.variations label {
    font-weight: bold;
    color: var(--stc-avada-color-4, #333); /* was #333 */
}

.variations select {
    padding: 8px 12px;
    border: 1px solid var(--stc-avada-color-3, #ccc); /* was #ccc */
    border-radius: 4px;
    min-width: 200px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .stc-selector-container .stc-selector {
        grid-template-columns: 1fr;
    }
    
    .stc-addon-products {
        grid-template-columns: 1fr !important;
    }
    
    .stc-vehicle-selection {
        padding: 15px;
    }
    
    .stc-ecu-field {
        padding: 10px;
    }
}

@media (max-width: 480px) {
    .stc-addon-product {
        padding: 15px;
    }
    
    .stc-addon-product h3 {
        font-size: 16px;
    }
    
    .stc-addon-product .price {
        font-size: 18px;
    }
}

/* Loading States */
.stc-loading {
    opacity: 0.6;
    pointer-events: none;
    position: relative;
}

.stc-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #0073aa;
    border-radius: 50%;
    border-top-color: transparent;
    animation: stc-spin 1s linear infinite;
}

@keyframes stc-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Admin E-commerce Page */
.stc-admin-ecommerce .postbox {
    margin-bottom: 20px;
}

.stc-admin-ecommerce .inside {
    padding: 20px;
}

.stc-admin-ecommerce h3 {
    margin-top: 20px;
    color: #0073aa;
}

.stc-admin-ecommerce ul {
    list-style-type: disc;
    margin-left: 20px;
}

.stc-admin-ecommerce code {
    background: #f1f1f1;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: monospace;
}

/* WooCommerce Integration Notice */
.stc-woo-notice {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    color: #856404;
    padding: 15px;
    border-radius: 4px;
    margin: 20px 0;
}

.stc-woo-notice.success {
    background: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}

.stc-woo-notice.error {
    background: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
} 