/* ==========================================================================
   Yooktel Variable Products Bottom Sheet Drawer Styles
   ========================================================================== */

.yook-bottom-sheet {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 999999;
    direction: rtl;
    text-align: right;
    box-sizing: border-box;
    display: none;
    align-items: flex-end;
    justify-content: center;
}

.yook-bottom-sheet.is-open {
    display: flex;
}

/* Backdrop Overlay */
.yook-sheet-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(18, 19, 38, 0.55);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.yook-bottom-sheet.is-open .yook-sheet-overlay {
    opacity: 1;
}

/* Drawer Container */
.yook-sheet-drawer {
    position: relative;
    width: 100%;
    max-width: 580px;
    background-color: #ffffff;
    border-radius: 24px 24px 0 0;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    z-index: 2;
    transform: translateY(100%);
    transition: transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.16);
    overflow: hidden;
}

.yook-bottom-sheet.is-open .yook-sheet-drawer {
    transform: translateY(0);
}

/* Touch Handle */
.yook-sheet-handle-wrap {
    width: 100%;
    display: flex;
    justify-content: center;
    padding-top: 10px;
    cursor: grab;
}

.yook-sheet-handle {
    width: 44px;
    height: 5px;
    background-color: #e0e0e4;
    border-radius: 999px;
}

/* Header */
.yook-sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px 14px;
    border-bottom: 1px solid #f0f0f2;
}

.yook-sheet-header-title {
    font-size: 15px;
    font-weight: 800;
    color: #23254e;
}

.yook-sheet-close {
    background: #f4f4f6;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #53546a;
    transition: background-color 0.2s ease;
}

.yook-sheet-close:hover {
    background-color: #e8e8ea;
}

/* Body */
.yook-sheet-body {
    padding: 18px 20px;
    overflow-y: auto;
    flex-grow: 1;
    -webkit-overflow-scrolling: touch;
}

.yook-sheet-loading-spinner {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px 0;
    color: #767790;
    font-size: 13px;
}

.yook-sheet-loading-spinner .yook-spinner {
    display: block;
    width: 28px;
    height: 28px;
    border-color: #e0e0e4;
    border-top-color: #ef394e;
}

/* Product Info Row */
.yook-sheet-product-row {
    display: flex;
    gap: 16px;
    margin-bottom: 20px;
}

.yook-sheet-gallery {
    width: 100px;
    height: 100px;
    background: #fafafb;
    border: 1px solid #e8e8ea;
    border-radius: 12px;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.yook-sheet-main-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.yook-sheet-summary {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.yook-sheet-title {
    font-size: 14px;
    font-weight: 700;
    color: #23254e;
    margin: 0 0 8px;
    line-height: 22px;
}

.yook-sheet-pricing {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.yook-sheet-regular-price {
    font-size: 12px;
    color: #9e9fb1;
    text-decoration: line-through;
}

.yook-sheet-sale-price {
    font-size: 16px;
    font-weight: 800;
    color: #ef394e;
}

.yook-sheet-stock-status {
    font-size: 12px;
    font-weight: 600;
    color: #00a046;
    margin-top: 4px;
}

/* Variations Form */
.yook-sheet-variations-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.yook-attr-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.yook-attr-label {
    font-size: 13px;
    font-weight: 700;
    color: #3f4064;
}

.yook-attr-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.yook-swatch-btn {
    border: 1.5px solid #e0e0e2;
    background-color: #ffffff;
    border-radius: 10px;
    padding: 6px 14px;
    font-size: 12.5px;
    font-weight: 600;
    color: #23254e;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.yook-swatch-btn:hover {
    border-color: #ef394e;
    color: #ef394e;
}

.yook-swatch-btn.is-selected {
    border-color: #ef394e;
    background-color: #fdf2f3;
    color: #ef394e;
    font-weight: 800;
}

.yook-color-circle {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

/* Footer / Actions */
.yook-sheet-footer {
    padding: 14px 20px 20px;
    border-top: 1px solid #f0f0f2;
    background-color: #ffffff;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.yook-sheet-footer-main {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Sheet Quantity Controller */
.yook-sheet-qty-controller {
    display: flex;
    align-items: center;
    border: 1.5px solid #e0e0e2;
    border-radius: 10px;
    padding: 0 4px;
    height: 44px;
    flex-shrink: 0;
}

.yook-sheet-qty-btn {
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    font-size: 18px;
    font-weight: 700;
    color: #53546a;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.yook-sheet-qty-btn:hover {
    color: #ef394e;
}

.yook-sheet-qty-val {
    font-size: 15px;
    font-weight: 800;
    color: #23254e;
    min-width: 28px;
    text-align: center;
}

/* Sheet Submit Button */
.yook-sheet-submit-btn {
    flex-grow: 1;
    height: 44px;
    border: none;
    border-radius: 10px;
    background-color: #ef394e;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background-color 0.2s ease;
}

.yook-sheet-submit-btn:disabled {
    background-color: #f0f0f1;
    color: #9e9fb1;
    cursor: not-allowed;
}

.yook-sheet-submit-btn:not(:disabled):hover {
    background-color: #d82a3e;
}

/* Continue Shopping */
.yook-sheet-continue-btn {
    width: 100%;
    padding: 8px 0;
    background: transparent;
    border: none;
    font-size: 12.5px;
    font-weight: 600;
    color: #767790;
    cursor: pointer;
    transition: color 0.2s ease;
}

.yook-sheet-continue-btn:hover {
    color: #23254e;
}

/* Desktop Centering Modal Option */
@media (min-width: 768px) {
    .yook-bottom-sheet {
        align-items: center;
    }

    .yook-sheet-drawer {
        border-radius: 20px;
        transform: translateY(20px) scale(0.96);
    }

    .yook-bottom-sheet.is-open .yook-sheet-drawer {
        transform: translateY(0) scale(1);
    }

    .yook-sheet-handle-wrap {
        display: none;
    }
}
