/* Quick-Add Modal — Variable Product Variation Picker */

/* Overlay */
#bp-quick-add-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 99998;
    animation: bp-qa-fade-in 0.2s ease;
}

#bp-quick-add-overlay.bp-qa-open {
    display: block;
}

/* Modal panel — slides up from bottom */
#bp-quick-add-modal {
    display: none;
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) translateY(100%);
    width: min(480px, 100%);
    max-height: 90vh;
    overflow-y: auto;
    background: #fff;
    border-radius: 12px 12px 0 0;
    z-index: 99999;
    padding: 28px 24px 32px;
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#bp-quick-add-modal.bp-qa-open {
    display: block;
    transform: translateX(-50%) translateY(0);
}

/* Close button */
.bp-quick-add-close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: color 0.2s, background 0.2s;
}

.bp-quick-add-close:hover {
    color: #333;
    background: #f5f5f5;
}

/* Body content */
.bp-quick-add-body {
    display: flex;
    flex-direction: column;
    gap: 0;
}

/* Loading spinner */
.bp-qa-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
}

.bp-qa-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid rgba(255, 42, 97, 0.2);
    border-top-color: #FF2A61;
    border-radius: 50%;
    animation: bp-qa-spin 0.8s linear infinite;
}

/* Product header (image + name + price) */
.bp-qa-header {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.bp-qa-image {
    flex: 0 0 80px;
    width: 80px;
    height: 80px;
    border-radius: 6px;
    object-fit: cover;
    background: #f7f7f7;
}

.bp-qa-info {
    flex: 1;
    min-width: 0;
}

.bp-qa-name {
    font-size: 15px;
    font-weight: 600;
    color: #222;
    margin: 0 0 6px;
    line-height: 1.3;
}

.bp-qa-price {
    font-size: 16px;
    font-weight: 700;
    color: #222;
}

.bp-qa-price del {
    color: #999;
    font-weight: 400;
    font-size: 13px;
    margin-right: 4px;
}

.bp-qa-price ins {
    text-decoration: none;
}

/* Attribute rows */
.bp-qa-attributes {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.bp-qa-attribute {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.bp-qa-attribute label {
    font-size: 13px;
    font-weight: 600;
    color: #444;
    text-transform: capitalize;
}

.bp-qa-attribute select {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    color: #333;
    background-color: #fff;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23666' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 10px;
    cursor: pointer;
    transition: border-color 0.2s;
}

.bp-qa-attribute select:focus {
    outline: none;
    border-color: #FF2A61;
}

/* Variation availability message */
.bp-qa-variation-msg {
    font-size: 13px;
    color: #888;
    margin-bottom: 12px;
    min-height: 18px;
}

.bp-qa-variation-msg.out-of-stock {
    color: #c00;
}

/* Add-to-cart button */
.bp-qa-add-btn {
    width: 100%;
    padding: 14px 20px;
    background: #FF2A61;
    color: #fff;
    border: none;
    border-radius: 2px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, opacity 0.2s;
}

.bp-qa-add-btn:hover:not(:disabled) {
    background: #d81b4d;
}

.bp-qa-add-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* Error state */
.bp-qa-error {
    text-align: center;
    padding: 30px 0;
    color: #c00;
    font-size: 14px;
}

/* Animations */
@keyframes bp-qa-fade-in {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes bp-qa-spin {
    to { transform: rotate(360deg); }
}
