/* ==========================================================
   Foundations Bookstore - Stylesheet
   ========================================================== */

/* ==========================================================
   Track List Layout
   ========================================================== */

.fbs-track-row {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 12px 0;
    border-bottom: 1px solid #ddd;
}

.fbs-track-preview {
    width: 42px;
    min-width: 42px;
    display: flex;
    justify-content: center;
    padding-top: 2px;
}

.fbs-track-title {
    flex: 1;
    min-width: 0;
    line-height: 1.3;
}

.fbs-track-duration {
    min-width: 50px;
    text-align: right;
    white-space: nowrap;
}

.fbs-track-buy {
    min-width: 90px;
    text-align: right;
    white-space: nowrap;
}

.fbs-track-list h2 {
    margin-bottom: 20px;
}

/* ==========================================================
   Shared Button Behavior
   ========================================================== */

.fbs-preview-button,
.fbs-cart-button {
    cursor: pointer;
    transition: all .15s ease;
}

.fbs-preview-button:hover,
.fbs-cart-button:hover {
    border-color: #046bd2;
}

.fbs-preview-button:focus,
.fbs-preview-button:focus-visible,
.fbs-cart-button:focus,
.fbs-cart-button:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px rgba(4,107,210,.20);
}

/* ==========================================================
   Preview Button Component
   ========================================================== */

.fbs-preview-button {
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    border: 1px solid #123c7b;
    border-radius: 50%;
    background: #fff;
    color: #123c7b;
}

.fbs-preview-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.fbs-preview-icon svg {
    width: 25px; /* Sized to match your desired visual look inside the button */
    height: 25px;
    display: block;
    fill: currentColor;
}

/* ==========================================================
   Cart Buttons Component
   ========================================================== */

.fbs-cart-button {
    width: 42px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 !important;
    margin: 0;
    border: 1px solid #123c7b;
    border-radius: 4px;
    background: #fff;
    color: #123c7b;
    text-decoration: none;
    font-size: 0 !important;
}

.fbs-cart-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.fbs-cart-icon svg {
    width: 20px;
    height: 20px;
    display: block;
}

/* ==========================================================
   Purchase Modal Overlay & Content
   ========================================================== */

.fbs-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 9999;
}

.fbs-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.fbs-modal-content {
    width: 500px;
    max-width: 90vw;
    background: #fff;
    border-radius: 8px;
    padding: 18px 24px 20px;
    position: relative;
}

.fbs-modal-close,
.fbs-modal-close:hover,
.fbs-modal-close:focus,
.fbs-modal-close:active,
.fbs-modal-close:focus-visible {
    position: absolute;
    top: 8px;
    right: 12px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #123c7b;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

#fbs-modal-body h3 {
    margin: 0 0 20px;
}

/* ==========================================================
   Modal Variation Rows Component
   ========================================================== */

.fbs-variation-row {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 14px 0;
}

.fbs-variation-left {
    flex: 1;
}

.fbs-variation-name {
    font-weight: 600;
    font-size: 18px;
}

.fbs-variation-description {
    margin-top: 2px;
    font-size: .95em;
    color: #666;
}

.fbs-variation-price {
    min-width: 70px;
    text-align: right;
    font-weight: 600;
    font-size: 18px;
    white-space: nowrap;
}

.fbs-variation-buy {
    min-width: 40px;
    text-align: center;
}

/* ==========================================================
   Responsive Breakpoints
   ========================================================== */

@media (max-width: 767px) {
    .fbs-track-row {
        gap: 12px;
    }

    .fbs-track-buy {
        min-width: 70px;
    }
}

/* ==========================================================
   Notice Template Component
   ========================================================== */

/* Hide the raw WooCommerce message template node by default */
#fbs-purchase-modal + .woocommerce-message,
.woocommerce-message:empty {
    display: none;
}