/* ==========================================================================
   EVNM Product Configurator — Frontend CSS v3.0.0
   Product page: two dependent dropdowns, result panel.
   Brand teal: #0f766e
   ========================================================================== */

/* ── Scope: .evnm-product-configurator ──────────────────────────────────── */
.evnm-product-configurator * { box-sizing: border-box; }

/* =========================================================================
   WRAPPER
   ========================================================================= */
.evnm-product-configurator {
    margin: 18px 0 14px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* =========================================================================
   DROPDOWN ROWS
   ========================================================================= */
.evnm-dropdown-row {
    margin-bottom: 14px;
}

.evnm-dropdown-label {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: #374151;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

/* Wrapper for select + arrow icon */
.evnm-select-wrap {
    position: relative;
    display: inline-block;
    width: 100%;
    max-width: 380px;
}

.evnm-dropdown {
    width: 100%;
    height: 46px;
    padding: 0 42px 0 14px;
    border: 1.5px solid #d1d5db;
    border-radius: 9px;
    font-size: 14px;
    font-weight: 500;
    color: #111827;
    background: #fff;
    cursor: pointer;
    outline: none;
    appearance: none;
    -webkit-appearance: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.evnm-dropdown:focus {
    border-color: #0f766e;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.14);
}
.evnm-dropdown:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    background: #f9fafb;
}

/* Custom dropdown arrow */
.evnm-select-arrow {
    position: absolute;
    right: 13px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #6b7280;
    flex-shrink: 0;
}

/* Secondary row visible when primary is selected */
.evnm-secondary-row .evnm-dropdown-label {
    color: #0f766e;
}
.evnm-secondary-row .evnm-dropdown {
    border-color: #0d9488;
}

/* =========================================================================
   RESULT PANEL
   ========================================================================= */
.evnm-result-panel {
    margin-top: 16px;
    background: #f0fdfa;
    border: 1.5px solid #ccfbf1;
    border-radius: 10px;
    padding: 16px 18px;
    animation: evnmFadeIn 0.22s ease;
}

@keyframes evnmFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Price inside result panel */
.evnm-result-price {
    font-size: 22px;
    font-weight: 800;
    color: #134e4a;
    margin-bottom: 14px;
    line-height: 1.2;
}
/* Keep WooCommerce price formatting */
.evnm-result-price .woocommerce-Price-amount { color: #134e4a; }
.evnm-result-price del { color: #6b7280; font-weight: 400; font-size: 14px; }
.evnm-result-price ins { text-decoration: none; }

/* Detail grid */
.evnm-result-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px 14px;
}

.evnm-result-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.evnm-result-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #5eead4;
}

.evnm-result-value {
    font-size: 13px;
    font-weight: 600;
    color: #134e4a;
}

/* =========================================================================
   STOCK STATUS INDICATORS
   ========================================================================= */
.evnm-stock-in {
    color: #059669;
}
.evnm-stock-low {
    color: #d97706;
}
.evnm-stock-out {
    color: #dc2626;
}

/* =========================================================================
   NO-MATCH NOTICE
   ========================================================================= */
.evnm-no-match {
    margin-top: 10px;
    padding: 10px 14px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 7px;
    color: #92400e;
    font-size: 13px;
}

/* =========================================================================
   WC PRICE SYNC — hide the default "Select options" / original price
   when the configurator is active and a combo is selected,
   we update the .price element directly via JS.
   ========================================================================= */
.evnm-product-configurator ~ .woocommerce-variation-price { display: none !important; }

/* =========================================================================
   RESPONSIVE
   ========================================================================= */
@media (max-width: 480px) {
    .evnm-result-price { font-size: 20px; }
    .evnm-result-details { grid-template-columns: 1fr 1fr; }
    .evnm-dropdown { height: 42px; font-size: 13px; }
}
