/* WooCommerce Dynamic Table Plugin Styles */

.wc-dynamic-table-widget {
    margin: 20px 0;
}

.wc-dynamic-table-widget .table-title {
    margin-bottom: 20px;
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
}

.wc-pricing-table-container {
    width: 100%;
    overflow-x: auto;
}

.wc-dynamic-pricing-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    font-family: inherit;
}

.wc-dynamic-pricing-table th {
    background: #DDA88D;
    color: white;
    padding: 15px 12px;
    text-align: left;
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
}

.wc-dynamic-pricing-table td {
    padding: 12px;
    border-bottom: 1px solid #f0f0f0;
    font-size: 0.9rem;
    color: #333;
    transition: all 0.3s ease;
    border-left: none;
    border-right: none;
    border-top: none;
}

.wc-dynamic-pricing-table tbody tr {
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.wc-dynamic-pricing-table tbody tr:hover {
    background-color: #E8C8BC !important;
    transform: translateX(5px);
    box-shadow: 0 2px 8px rgba(221, 168, 141, 0.2);
}

.wc-dynamic-pricing-table tbody tr:hover td {
    color: white !important;
}

.wc-dynamic-pricing-table tbody tr:hover .attribute-value {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    color: white !important;
}

.wc-dynamic-pricing-table tbody tr:hover .price-cell {
    color: white !important;
    font-weight: 800;
}

.wc-dynamic-pricing-table tr:last-child td {
    border-bottom: none;
}

.attribute-value {
    background: #f8f9fa;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
    margin: 2px;
    display: inline-block;
    border: 1px solid #e9ecef;
    transition: all 0.3s ease;
}

.price-cell {
    font-weight: 700;
    color: #DDA88D;
    font-size: 1rem;
}

.loading {
    text-align: center;
    padding: 40px;
    color: #999;
    font-style: italic;
}

.wc-dynamic-pricing-table tbody tr.selected {
    background-color: #E8C8BC !important;
    color: white !important;
}

.wc-dynamic-pricing-table tbody tr.selected td {
    color: white !important;
}

.wc-dynamic-pricing-table tbody tr.selected .attribute-value {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    color: white !important;
}

.wc-dynamic-pricing-table tbody tr.selected .price-cell {
    color: white !important;
    font-weight: 800;
}

/* Responsive Design */
@media (max-width: 768px) {
    .wc-dynamic-pricing-table {
        font-size: 0.85rem;
    }
    
    .wc-dynamic-pricing-table th,
    .wc-dynamic-pricing-table td {
        padding: 10px 8px;
        font-size: 0.8rem;
    }
    
    .attribute-value {
        font-size: 0.75rem;
        padding: 3px 6px;
        margin: 1px;
    }
    
    .price-cell {
        font-size: 0.9rem;
    }
    
    .wc-dynamic-table-widget .table-title {
        font-size: 1.25rem;
    }
}

@media (max-width: 480px) {
    .wc-dynamic-pricing-table {
        font-size: 0.8rem;
    }
    
    .wc-dynamic-pricing-table th,
    .wc-dynamic-pricing-table td {
        padding: 8px 6px;
        font-size: 0.75rem;
    }
    
    .attribute-value {
        font-size: 0.7rem;
        padding: 2px 4px;
    }
    
    .price-cell {
        font-size: 0.85rem;
    }
    
    .wc-dynamic-table-widget .table-title {
        font-size: 1.1rem;
        margin-bottom: 15px;
    }
}

/* Animation for row selection */
@keyframes selectRow {
    0% { background-color: transparent; }
    50% { background-color: rgba(221, 168, 141, 0.3); }
    100% { background-color: #E8C8BC; }
}

.wc-dynamic-pricing-table tbody tr.selecting {
    animation: selectRow 0.5s ease-in-out;
}

/* Elementor Editor Specific Styles */
.elementor-editor .wc-dynamic-pricing-table {
    pointer-events: none;
}

.elementor-editor .loading {
    color: #666;
    font-weight: normal;
}