/**
 * TS Gift Box - Frontend Styles
 */

/* Main Container */
.ts-gift-box {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    margin: 14px 0;
    background:
        radial-gradient(circle at 12px 12px, rgba(255,255,255,0.9) 0 6px, transparent 7px),
        linear-gradient(135deg, #fff6f7 0%, #ffeef2 50%, #fff7ef 100%);
    border-radius: 14px;
    border: 1px solid rgba(232,116,124,0.25);
    box-shadow: 0 8px 22px rgba(232,116,124,0.12);
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
}

.ts-gift-box::after {
    content: "";
    position: absolute;
    right: -30px;
    top: -30px;
    width: 90px;
    height: 90px;
    background: radial-gradient(circle, rgba(232,116,124,0.2), transparent 70%);
    pointer-events: none;
}

/* Image */
.ts-gift-box__image-wrapper {
    flex-shrink: 0;
}

.ts-gift-box__image-link {
    display: block;
    cursor: zoom-in;
    transition: transform 0.2s;
}

.ts-gift-box__image-link:hover {
    transform: scale(1.05);
}

.ts-gift-box__image {
    display: block;
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: 10px;
    border: 2px solid #fff;
    box-shadow: 0 6px 14px rgba(0,0,0,0.12);
}

/* Content */
.ts-gift-box__content {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.ts-gift-box__header {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.ts-gift-box__title {
    font-size: 15px;
    font-weight: 600;
    color: #2f2a2c;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ts-gift-box__price-wrap {
    margin-left: auto;
    display: flex;
    align-items: center;
}

.ts-gift-box__price {
    font-size: 14px;
    font-weight: 700;
    color: #e8747c;
    padding: 4px 8px;
    background: #fff;
    border-radius: 999px;
    border: 1px solid rgba(232,116,124,0.25);
    white-space: nowrap;
}

/* Checkbox */
.ts-gift-box__checkbox-wrapper {
    display: flex;
    align-items: center;
    margin-right: 2px;
}

.ts-gift-box__label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    margin: 0;
    padding: 0;
    background: rgba(255,255,255,0.7);
    border: 1px solid rgba(232,116,124,0.25);
    border-radius: 999px;
    padding: 8px 12px;
    min-height: 36px;
}

.ts-gift-box__label:focus-within {
    box-shadow: 0 0 0 3px rgba(232,116,124,0.2);
}

.ts-gift-box__checkbox {
    width: 18px;
    height: 18px;
    margin: 0;
    cursor: pointer;
    accent-color: #e8747c;
}

.ts-gift-box__checkbox-text {
    font-size: 14px;
    color: #4d3b3f;
    font-weight: 600;
}

/* Lightbox */
.ts-gift-box-lightbox {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2147483647;
    align-items: center;
    justify-content: center;
}

.ts-gift-box-lightbox.active {
    display: flex;
}

.ts-gift-box-lightbox__overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    cursor: pointer;
    z-index: 1;
}

.ts-gift-box-lightbox__content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    z-index: 2;
}

.ts-gift-box-lightbox__image {
    display: block;
    max-width: 100%;
    max-height: 90vh;
    border-radius: 6px;
}

.ts-gift-box-lightbox__close {
    position: absolute;
    top: -12px;
    right: -12px;
    width: 32px;
    height: 32px;
    background: #fff;
    border: none;
    border-radius: 50%;
    font-size: 22px;
    line-height: 30px;
    text-align: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.ts-gift-box-lightbox__close:hover {
    background: #f5f5f5;
}

/* Responsive */
@media (max-width: 480px) {
    .ts-gift-box {
        flex-direction: row;
        align-items: center;
        padding: 12px 12px;
        gap: 10px;
    }
    .ts-gift-box__image-wrapper {
        align-self: center;
    }
    .ts-gift-box__image {
        width: 48px;
        height: 48px;
    }
    .ts-gift-box__content {
        flex-direction: row;
        gap: 8px;
    }
    .ts-gift-box__title {
        font-size: 14px;
    }
    .ts-gift-box__price {
        font-size: 13px;
        padding: 3px 7px;
    }
    .ts-gift-box__label {
        padding: 5px 8px;
    }
    .ts-gift-box__checkbox-text {
        font-size: 13px;
    }
}
