/* Table Configurator Styling */
.table-configurator-wrapper {
    margin: 20px 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.table-configurator-wrapper h3 {
    margin: 0;
    padding: 15px 20px;
    background: #f8f8f8;
    border-bottom: 1px solid #ddd;
    font-size: 18px;
    font-weight: 600;
}

.configurator-iframe-container {
    position: relative;
    width: 100%;
    min-height: 800px;
}

.configurator-iframe-container iframe {
    width: 100%;
    height: 800px;
    border: none;
    display: block;
}

.configurator-actions {
    padding: 20px;
    background: #f8f8f8;
    border-top: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.price-display {
    font-size: 18px;
    color: #333;
}

.price-display strong {
    color: #2c5aa0;
}

#add-configured-to-cart {
    background-color: #2c5aa0;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    min-width: 200px;
}

#add-configured-to-cart:hover:not(:disabled) {
    background-color: #1e3d6f;
}

#add-configured-to-cart:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Notifications */
.configurator-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 4px;
    color: white;
    font-weight: 600;
    z-index: 9999;
    max-width: 300px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    display: none;
}

.configurator-notification-success {
    background-color: #28a745;
}

.configurator-notification-error {
    background-color: #dc3545;
}

.configurator-notification-info {
    background-color: #17a2b8;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .configurator-actions {
        flex-direction: column;
        text-align: center;
    }
    
    .price-display {
        order: 2;
        margin-bottom: 10px;
    }
    
    #add-configured-to-cart {
        order: 1;
        width: 100%;
        margin-bottom: 10px;
    }
    
    .configurator-iframe-container iframe {
        height: 600px;
    }
    
    .configurator-notification {
        left: 20px;
        right: 20px;
        top: 10px;
        max-width: none;
    }
}

/* WooCommerce integration */
.single-product .table-configurator-wrapper {
    margin-top: 30px;
}

/* Loading state */
.configurator-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.configurator-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #ccc;
    border-top: 2px solid #2c5aa0;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

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

/* Hide default add to cart when configurator is active */
.product-configurator-enabled .cart {
    display: none;
}