/**
 * Gift Option Styles
 */

/* ========================================
   CHECKOUT - Gift Option Selector
   ======================================== */
.gift-option-checkout {
    margin: 0 0 20px 0;
    padding: 15px;
    background: linear-gradient(135deg, #fff9f0 0%, #fff5f5 100%);
    border: 1px solid #f0e0d0;
    border-radius: 8px;
    border-left: 4px solid #e74c3c;
    position: relative;
    transition: opacity 0.3s ease;
}

.gift-option-checkout.loading {
    opacity: 0.6;
    pointer-events: none;
}

.gift-option-checkout.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #e74c3c;
    border-radius: 50%;
    animation: gift-option-spin 0.8s linear infinite;
}

.gift-option-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
}

.gift-option-checkout .gift-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.gift-option-checkout .gift-option-icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
    flex-shrink: 0;
}

.gift-option-checkout .gift-option-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    margin: 0;
    flex: 1;
}

.gift-option-checkout .gift-option-checkbox {
    width: 18px;
    height: 18px;
    margin-right: 8px;
    cursor: pointer;
    accent-color: #e74c3c;
    flex-shrink: 0;
}

.gift-option-checkout .gift-option-label-text {
    color: #333;
    font-weight: 500;
    line-height: 1.3;
}

/* Message area */
.gift-option-message-area {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed #e0d0c0;
}

.gift-option-checkout .gift-option-textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    resize: vertical;
    min-height: 70px;
    font-family: inherit;
    box-sizing: border-box;
    background: #fff;
}

.gift-option-checkout .gift-option-textarea:focus {
    outline: none;
    border-color: #e74c3c;
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.1);
}

.gift-option-checkout .gift-message-counter {
    text-align: right;
    font-size: 11px;
    color: #999;
    margin-top: 4px;
}

/* ========================================
   CHECKOUT TOTALS - Gift Option Line
   ======================================== */
.totals.gift-option .mark,
.totals.gift-option .amount {
    font-size: 14px;
}

.totals.gift-option .mark .gift-icon {
    margin-right: 4px;
}

/* ========================================
   PRODUCT PAGE - Gift Option Block
   ======================================== */
.gift-option-product {
    margin: 20px 0;
    padding: 15px;
    background: linear-gradient(135deg, #fff9f0 0%, #fff5f5 100%);
    border: 1px solid #f0e0d0;
    border-radius: 8px;
    border-left: 4px solid #e74c3c;
}

.gift-option-product .gift-option-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.gift-option-product .gift-option-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.gift-option-product .gift-icon {
    font-size: 24px;
}

.gift-option-product .gift-option-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.gift-option-product .gift-option-description {
    font-size: 13px;
    color: #666;
    margin: 0 0 12px 0;
    line-height: 1.4;
}

.gift-option-product .gift-option-checkbox-wrapper {
    margin-bottom: 10px;
}

.gift-option-product .gift-option-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
}

.gift-option-product .gift-option-checkbox {
    width: 18px;
    height: 18px;
    margin-right: 10px;
    cursor: pointer;
    accent-color: #e74c3c;
}

.gift-option-product .gift-option-label-text {
    color: #333;
}

.gift-option-product .gift-option-price {
    color: #e74c3c;
    font-weight: 600;
}

.gift-option-product .gift-option-message-wrapper {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed #e0d0c0;
}

.gift-option-product .gift-message-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.gift-option-product .gift-option-textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
    box-sizing: border-box;
}

.gift-option-product .gift-option-textarea:focus {
    outline: none;
    border-color: #e74c3c;
    box-shadow: 0 0 0 2px rgba(231, 76, 60, 0.1);
}

.gift-option-product .gift-message-counter {
    text-align: right;
    font-size: 12px;
    color: #888;
    margin-top: 5px;
}

.gift-option-product .gift-message-counter .limit-reached {
    color: #e74c3c;
    font-weight: 600;
}

/* ========================================
   CART PAGE - Gift Option on Items
   ======================================== */
.cart-item-gift-option {
    margin: 10px 0;
    padding: 8px 12px;
    background: linear-gradient(135deg, #fff9f0 0%, #fff5f5 100%);
    border-left: 3px solid #e74c3c;
    border-radius: 0 4px 4px 0;
    font-size: 13px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 5px;
}

.cart-item-gift-option .gift-icon {
    margin-right: 3px;
}

.cart-item-gift-option .gift-label {
    color: #e74c3c;
    font-weight: 600;
}

.cart-item-gift-option .gift-amount {
    color: #333;
    font-weight: 600;
    margin-left: 5px;
}

.cart-item-gift-option .gift-message-preview {
    width: 100%;
    margin-top: 5px;
    font-size: 12px;
    color: #666;
}

.cart-item-gift-option .gift-message-preview em {
    color: #333;
}

/* ========================================
   ANIMATION
   ======================================== */
@keyframes gift-option-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    .gift-option-checkout {
        padding: 12px;
    }
    
    .gift-option-toggle {
        flex-wrap: wrap;
    }
    
    .gift-option-product .gift-option-header {
        flex-wrap: wrap;
    }
}
