/**
 * WCPMP Swatches Styles
 */

/* Starting From Text - Reduced Size */
.wcpmp-starting-price {
    font-size: 18px !important;
    font-weight: 400;
    opacity: 0.7;
    display: block;
    /* Ensure it checks on new line or block if needed */
    margin-bottom: 2px;
}

.wcpmp-hidden-select {
    display: none !important;
}

.wcpmp-swatches {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    /* Back to 2 columns for space */
    gap: 10px;
    margin-bottom: 20px;
    padding: 0 !important;
    /* Fix alignment issues */
    margin-left: 0 !important;
    /* Fix alignment issues */
    box-sizing: border-box;
}

@media (min-width: 600px) {
    .wcpmp-swatches {
        grid-template-columns: repeat(4, 1fr);
        /* 4 columns on desktop is fine */
    }
}

.wcpmp-swatch-btn {
    appearance: none;
    -webkit-appearance: none;
    background: #fff;
    border: 1px solid #e1e1e1;
    color: #555;
    padding: 8px 15px 8px 15px !important;
    /* User specified padding */
    cursor: pointer;
    font-size: 11px;
    /* Readable small font */
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    border-radius: 4px;
    transition: all 0.25s ease;

    /* Layout */
    width: 100%;
    min-height: 48px;
    /* Standard touch height */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.25;

    /* Text Handling - CRITICAL FIX */
    word-break: normal;
    /* Do not break words like 'SILVE R' */
    overflow-wrap: break-word;
    /* Wrap long words if absolutely necessary */

    /* Shadow for depth */
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.wcpmp-swatch-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
    border-color: #aaa;
    color: #000 !important;
    /* Force dark text on hover */
    background-color: #fcfcfc;
}

.wcpmp-swatch-btn.selected {
    border-color: #000;
    color: #fff;
    background: #222;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* --- Premium Metallic Styles --- */

/* Gold: Warm Champagne Gradient */
.wcpmp-swatch-btn.is-gold {
    background: linear-gradient(135deg, #FFFDF2 0%, #FFF 40%, #F4E2B2 100%);
    border-color: #E6D297;
    color: #8A7030;
}

.wcpmp-swatch-btn.is-gold:hover {
    border-color: #CFAE60;
}

.wcpmp-swatch-btn.is-gold.selected {
    background: linear-gradient(135deg, #D4AF37 0%, #B88A00 100%);
    color: #fff;
    border-color: #997400;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
}

/* Silver: Sleek Platinum Gradient */
.wcpmp-swatch-btn.is-silver {
    background: linear-gradient(135deg, #F9F9F9 0%, #F0F2F5 60%, #E0E4E8 100%);
    border-color: #D1D5DB;
    color: #556270;
}

.wcpmp-swatch-btn.is-silver:hover {
    border-color: #AAB2BD;
}

.wcpmp-swatch-btn.is-silver.selected {
    background: linear-gradient(135deg, #8E9EAB 0%, #687D8B 100%);
    color: #fff;
    border-color: #546E7A;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
}

/* Plated: Subtle Bottom Accent */
.wcpmp-swatch-btn.is-plated {
    border-bottom: 2px solid #D4AF37;
}

/* Mixed: Sophisticated Diagonal Split */
.wcpmp-swatch-btn.is-mixed {
    background: linear-gradient(120deg, #F0F2F5 35%, #FFF 50%, #FFF8DB 65%);
    border-color: #DADADA;
    color: #666;
}

.wcpmp-swatch-btn.is-mixed.selected {
    background: linear-gradient(120deg, #7F8C8D 40%, #B88A00 100%);
    color: #fff;
    border-color: #555;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* --- DISABLED STATE (Must be last to override all others) --- */
.wcpmp-swatch-btn.disabled,
.wcpmp-swatch-btn.force-disabled {
    opacity: 0.5 !important;
    background: #f0f0f0 !important;
    background-image: none !important;
    /* Kill gradients */
    color: #999 !important;
    text-decoration: line-through !important;
    border-color: #ddd !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
    box-shadow: none !important;
}

.wcpmp-swatches.hide-disabled-buttons .wcpmp-swatch-btn.disabled,
.wcpmp-swatches.hide-disabled-buttons .wcpmp-swatch-btn.force-disabled {
    display: none !important;
}

/* --- Price Breakdown Box --- */
.wcpmp-price-breakdown-box {
    background: #f9f9f9;
    border: 1px solid #e5e5e5;
    padding: 15px;
    border-radius: 8px;
    margin-top: 15px;
    font-size: 12px;
    color: #555;
    max-width: 100%;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    font-family: inherit;
    /* Inherit theme font */
}

.wcpmp-price-breakdown-box .bp-header {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #999;
    margin-bottom: 10px;
    font-weight: 600;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.wcpmp-price-breakdown-box .bp-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    line-height: 1.4;
}

.wcpmp-price-breakdown-box .bp-label {
    flex: 1;
}

.wcpmp-price-breakdown-box .bp-value {
    font-weight: 500;
    color: #333;
}

.wcpmp-price-breakdown-box .bp-total {
    font-weight: 700;
    color: #222;
    margin-top: 8px;
    font-size: 13px;
}

.wcpmp-price-breakdown-box .bp-divisor {
    height: 1px;
    background: #e5e5e5;
    margin: 8px 0;
}

.wcpmp-price-breakdown-box .bp-note {
    font-size: 10px;
    color: #aaa;
    font-style: italic;
    margin-top: 8px;
    text-align: right;
}