/**
 * Frontend styles for Simple Product Attribute Dropdown
 */

.spad-wrapper {
    margin: 20px 0;
    padding: 15px;
    background: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

.spad-field {
    margin-bottom: 15px;
}

.spad-field:last-child {
    margin-bottom: 0;
}

.spad-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.spad-select {
    width: 100%;
    max-width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background-color: #fff;
    color: #333;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.spad-select:hover {
    border-color: #999;
}

.spad-select:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.1);
}

.spad-select option {
    padding: 8px;
}

.spad-select option[hidden] {
    display: none;
}

.spad-select option[disabled] {
    opacity: 0.5;
    color: #999;
}

.spad-select option[data-price]:not([data-price="0"]),
.spad-loop-select option[data-price]:not([data-price="0"]) {
    color: #7a7a7a;
}

.spad-loop-select.spad-invalid {
    border-color: #d63638 !important;
}

.spad-loop-error {
    color: #d63638;
    font-size: 13px;
    margin-top: 6px;
}

.spad-price-display {
    margin-top: 15px;
    padding: 10px 12px;
    background: #e8f5e9;
    border-left: 4px solid #4caf50;
    color: #2e7d32;
    font-weight: 600;
    border-radius: 2px;
    font-size: 14px;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .spad-wrapper {
        padding: 12px;
        margin: 15px 0;
    }

    .spad-field {
        margin-bottom: 12px;
    }

    .spad-select {
        padding: 8px 10px;
        font-size: 16px; /* Prevents zoom on iOS */
    }

    .spad-label {
        font-size: 13px;
        margin-bottom: 5px;
    }

    .spad-price-display {
        margin-top: 12px;
        padding: 8px 10px;
        font-size: 13px;
    }
}
