/* WooCommerce Gift Options - Frontend Styles */

.wc-gift-options-container {
    margin: 24px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
}

.wc-gift-options-card {
    background-color: #FAF7F2;
    border: 1px solid rgba(226, 217, 204, 0.7);
    border-radius: 14px;
    padding: 28px 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
    box-sizing: border-box;
}

.wc-gift-options-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 24px;
    font-weight: 500;
    color: #2D2721;
    margin: 0 0 20px 0;
    padding: 0;
    line-height: 1.25;
    letter-spacing: -0.2px;
}

.wc-gift-options-list {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.wc-gift-option-row {
    position: relative;
}

.wc-gift-option-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    gap: 16px;
    margin: 0;
    padding: 0;
}

/* Custom Checkbox */
.wc-gift-checkbox-wrap {
    position: relative;
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    margin-top: 1px;
}

.wc-gift-option-checkbox {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
    margin: 0;
}

.wc-gift-custom-checkbox {
    position: absolute;
    top: 0;
    left: 0;
    height: 22px;
    width: 22px;
    background-color: #FFFFFF;
    border: 2px solid #D8CFC4;
    border-radius: 6px;
    box-sizing: border-box;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.wc-gift-custom-checkbox svg {
    opacity: 0;
    transform: scale(0.6);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.wc-gift-option-label:hover .wc-gift-custom-checkbox {
    border-color: #B98A52;
}

.wc-gift-option-checkbox:checked ~ .wc-gift-custom-checkbox {
    background-color: #C49A6C;
    border-color: #C49A6C;
}

.wc-gift-option-checkbox:checked ~ .wc-gift-custom-checkbox svg {
    opacity: 1;
    transform: scale(1);
}

/* Content */
.wc-gift-option-content {
    flex-grow: 1;
    min-width: 0;
}

.wc-gift-option-header-line {
    display: flex;
    align-items: center;
}

.wc-gift-option-name {
    font-size: 16px;
    font-weight: 600;
    color: #211D19;
    line-height: 1.3;
}

.wc-gift-option-description {
    font-size: 13.5px;
    color: #857E76;
    margin: 3px 0 0 0;
    line-height: 1.4;
}

.wc-gift-option-note {
    font-size: 13px;
    font-style: italic;
    color: #8C6D2F;
    margin: 6px 0 0 0;
    line-height: 1.4;
}

.wc-gift-option-min-qty-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    color: #8C6D2F;
    background: #F5EBD8;
    border-radius: 10px;
    padding: 2px 8px;
    margin-left: 8px;
    white-space: nowrap;
    vertical-align: middle;
    transition: all 0.2s ease;
}

/* Disabled Option State (when quantity < min_qty) */
.wc-gift-option-row.wc-gift-option-disabled {
    opacity: 0.55;
    transition: opacity 0.25s ease;
}

.wc-gift-option-row.wc-gift-option-disabled .wc-gift-option-label {
    cursor: not-allowed;
}

.wc-gift-option-row.wc-gift-option-disabled .wc-gift-option-checkbox {
    cursor: not-allowed;
}

.wc-gift-option-row.wc-gift-option-disabled .wc-gift-custom-checkbox {
    background-color: #EFECE6;
    border-color: #DCD4C8;
    cursor: not-allowed;
}

.wc-gift-option-row.wc-gift-option-disabled .wc-gift-option-label:hover .wc-gift-custom-checkbox {
    border-color: #DCD4C8;
}

.wc-gift-option-row.wc-gift-option-disabled .wc-gift-option-min-qty-badge {
    background-color: #FEF3C7;
    color: #92400E;
    border: 1px solid #FCD34D;
}

/* Price Tag */
.wc-gift-option-price-tag {
    font-size: 14.5px;
    font-weight: 500;
    color: #8C8378;
    margin-left: auto;
    white-space: nowrap;
    padding-left: 8px;
}

/* Image Media */
.wc-gift-option-media {
    width: 58px;
    height: 58px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: hidden;
    margin-left: 12px;
    background-color: #F0EAE1;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.wc-gift-option-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Textarea input when checked */
.wc-gift-option-text-container {
    margin-top: 12px;
    margin-left: 38px;
    animation: fadeInSlideDown 0.25s ease-out forwards;
}

.wc-gift-option-textarea {
    width: 100%;
    box-sizing: border-box;
    padding: 10px 14px;
    border: 1px solid #DFD6C9;
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    color: #2D2721;
    background-color: #FFFFFF;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.wc-gift-option-textarea:focus {
    border-color: #C49A6C;
    box-shadow: 0 0 0 3px rgba(196, 154, 108, 0.15);
}

@keyframes fadeInSlideDown {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile responsive */
@media (max-width: 600px) {
    .wc-gift-options-card {
        padding: 20px 18px;
    }
    .wc-gift-options-title {
        font-size: 20px;
    }
    .wc-gift-option-media {
        width: 46px;
        height: 46px;
    }
    .wc-gift-option-text-container {
        margin-left: 0;
    }
}
