/**
 * Module ws_dynamicprice - Front-office CSS
 * Design Plan & Vasque (sombre / or)
 */

.ws-dynamicprice-container {
    margin: 32px 0;
    padding: 24px;
    background: #141413;
    border: 1px solid #242424;
    border-radius: 12px;
    color: #FFFFFF;
}

/* Prix "à partir de" - fiche produit */
.ws-dynamicprice-starting-price {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.ws-dynamicprice-starting-price .ws-dynamicprice-starting-label {
    font-size: 14px;
    color: rgba(255,255,255,0.7);
    font-weight: 400;
}

.ws-dynamicprice-starting-price .ws-dynamicprice-starting-value {
    font-size: 24px;
    font-weight: 600;
    color: #FFE1B8;
}

.ws-dynamicprice-starting-price .ws-dynamicprice-starting-tax {
    font-size: 12px;
    color: rgba(255,255,255,0.7);
    font-weight: 400;
}

/* Prix "à partir de" - miniatures listing */
.product-price .ws-dynamicprice-starting-label {
    font-size: 11px;
    color: #d0d0d0;
    font-weight: 300;
    display: block;
}

.product-price .ws-dynamicprice-starting-value {
    font-size: 20px;
    font-weight: 500;
    color: #FFE1B8;
}

.product-price .ws-dynamicprice-starting-tax {
    font-size: 11px;
    color: #d0d0d0;
    font-weight: 300;
}

.ws-dynamicprice-title h4 {
    margin: 0 0 24px 0;
    padding-bottom: 16px;
    border-bottom: 1px solid #242424;
    color: #FFFFFF;
    font-family: 'Montserrat', sans-serif;
    font-size: 18px;
    font-weight: 600;
}

.ws-dynamicprice-form {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.ws-dynamicprice-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.ws-dynamicprice-field {
    flex: 1;
    min-width: 140px;
    margin-bottom: 16px;
}

.ws-dynamicprice-field label {
    display: block;
    margin-bottom: 8px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 400;
    font-size: 14px;
    color: rgba(255,255,255,0.7);
}

.ws-dynamicprice-field input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #242424;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    color: #FFFFFF;
    background: #0d0d0d;
    transition: border-color 0.2s;
    -webkit-appearance: none;
    -moz-appearance: textfield;
}

.ws-dynamicprice-field input:focus {
    outline: none;
    border-color: #FFE1B8;
    box-shadow: none;
}

.ws-dynamicprice-field input::placeholder {
    color: #3b3b3b;
}

.ws-dynamicprice-field input:invalid {
    border-color: #ff6b6b;
}

.ws-dynamicprice-hint {
    display: block;
    margin-top: 6px;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    color: rgba(255,255,255,0.7);
}

/* Dimensions fixes (readonly) */
.ws-dynamicprice-field input.ws-dimension-fixed {
    background-color: #1a1a1a;
    cursor: not-allowed;
    color: rgba(255,255,255,0.5);
    font-weight: 500;
}

.ws-dynamicprice-field input.ws-dimension-fixed:focus {
    border-color: #242424;
    box-shadow: none;
}

.ws-dynamicprice-result {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
    padding: 20px 0 16px;
    background: transparent;
    border-radius: 0;
    border: none;
    border-top: 1px solid #242424;
    margin-top: 8px;
}

.ws-dynamicprice-surface,
.ws-dynamicprice-price {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-family: 'Montserrat', sans-serif;
}

.ws-dynamicprice-label {
    font-weight: 400;
    font-size: 14px;
    color: rgba(255,255,255,0.7);
}

.ws-dynamicprice-value {
    font-size: 16px;
    font-weight: 500;
    color: #FFFFFF;
}

.ws-dynamicprice-price-value {
    color: #FFE1B8;
    font-weight: 600;
    font-size: 24px;
}

.ws-dynamicprice-unit {
    font-size: 14px;
    color: rgba(255,255,255,0.7);
}

.ws-dynamicprice-errors {
    padding: 12px 16px;
    background: rgba(255, 107, 107, 0.1);
    border: 1px solid rgba(255, 107, 107, 0.3);
    border-radius: 8px;
    color: #ff6b6b;
    font-size: 14px;
}

.ws-dynamicprice-errors p {
    margin: 5px 0;
}

.ws-dynamicprice-actions {
    margin-top: 16px;
}

/* Bouton - design gold */
.ws-dynamicprice-btn.add-to-cart {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    background-color: #FFE1B8 !important;
    border: 1px solid #FFE1B8 !important;
    color: #0d0d0d !important;
    font-family: 'Montserrat', sans-serif !important;
    font-weight: 500 !important;
    font-size: 16px !important;
    padding: 12px 24px !important;
    border-radius: 8px !important;
    transition: opacity 0.2s ease;
    cursor: pointer;
}

.ws-dynamicprice-btn.add-to-cart:hover:not(:disabled) {
    opacity: 0.9;
}

.ws-dynamicprice-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.ws-dynamicprice-btn i.spinner-icon {
    display: none;
}

.ws-dynamicprice-success {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    background: #FFE1B8;
    color: #0d0d0d;
    border-radius: 8px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
    z-index: 9999;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Panier */
.ws-cart-dimensions-info {
    margin: 20px 0;
    padding: 15px;
    background: #141413;
    border: 1px solid #242424;
    border-radius: 8px;
    color: #FFFFFF;
}

.ws-cart-dimensions-info h4 {
    margin: 0 0 10px 0;
    font-size: 16px;
    color: #FFFFFF;
}

.ws-cart-dimensions-table {
    width: 100%;
    border-collapse: collapse;
}

.ws-cart-dimensions-table th,
.ws-cart-dimensions-table td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid #242424;
    color: #FFFFFF;
}

.ws-cart-dimensions-table th {
    font-weight: 600;
    background: #1a1a1a;
}

/* Responsive */
@media (max-width: 768px) {
    .ws-dynamicprice-row {
        flex-direction: column;
        gap: 0;
    }

    .ws-dynamicprice-field {
        min-width: 100%;
    }

    .ws-dynamicprice-result {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .ws-dynamicprice-btn {
        width: 100%;
        justify-content: center;
    }
}
