/* =========================================
   Gift Wrapper for WooCommerce - Frontend
   ========================================= */

/* Wrap Section */
.gw-wrap-section {
    border: 2px dashed #e2b23c;
    border-radius: 12px;
    padding: 24px;
    margin: 24px 0;
    background: linear-gradient(135deg, #fffdf0 0%, #fff8e7 100%);
    position: relative;
    transition: all 0.3s ease;
}

.gw-wrap-section:hover {
    border-color: #d4960a;
    box-shadow: 0 4px 20px rgba(226, 178, 60, 0.2);
}

/* Header */
.gw-wrap-header {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
}

.gw-wrap-icon {
    font-size: 2.5rem;
    line-height: 1;
    flex-shrink: 0;
}

.gw-wrap-info {
    flex: 1;
}

.gw-wrap-info h3 {
    margin: 0 0 4px;
    font-size: 1.2rem;
    font-weight: 700;
    color: #2d2d2d;
}

.gw-wrap-info p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

.gw-wrap-price-badge {
    background: #e2b23c;
    color: #fff;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.9rem;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Controls */
.gw-wrap-controls {
    background: #fff;
    border-radius: 8px;
    padding: 16px;
    border: 1px solid #f0e0b0;
}

/* Quantity Row */
.gw-qty-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.gw-qty-row label {
    font-weight: 600;
    color: #444;
    margin: 0;
    font-size: 0.95rem;
}

.gw-qty-wrapper {
    display: flex;
    align-items: center;
    border: 2px solid #e2b23c;
    border-radius: 8px;
    overflow: hidden;
}

.gw-qty-btn {
    background: #e2b23c;
    color: #fff;
    border: none;
    padding: 8px 14px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
    line-height: 1;
}

.gw-qty-btn:hover {
    background: #c49a28;
}

.gw-qty-input {
    width: 56px;
    text-align: center;
    border: none;
    font-size: 1rem;
    font-weight: 700;
    color: #2d2d2d;
    padding: 8px 4px;
    -moz-appearance: textfield;
    appearance: textfield;
    background: #fff;
}

.gw-qty-input::-webkit-inner-spin-button,
.gw-qty-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
}

.gw-total-label {
    color: #555;
    font-size: 0.95rem;
    margin-left: auto;
}

.gw-total-label strong {
    color: #e2b23c;
    font-size: 1.1rem;
}

/* Message */
.gw-message-row {
    margin-top: 12px;
}

.gw-message-row label {
    display: block;
    font-weight: 600;
    color: #444;
    margin-bottom: 6px;
    font-size: 0.9rem;
}

.gw-message-input {
    width: 100%;
    border: 1.5px solid #ddd;
    border-radius: 6px;
    padding: 10px;
    font-size: 0.9rem;
    resize: vertical;
    font-family: inherit;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.gw-message-input:focus {
    outline: none;
    border-color: #e2b23c;
}

.gw-char-count {
    text-align: right;
    font-size: 0.78rem;
    color: #999;
    margin: 4px 0 0;
}

/* Action Row */
.gw-action-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
}

.gw-apply-btn {
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.gw-btn-add {
    background: #e2b23c;
    color: #fff;
}

.gw-btn-add:hover {
    background: #c49a28;
    transform: translateY(-1px);
}

.gw-btn-remove {
    background: #fff;
    color: #c0392b;
    border: 2px solid #c0392b;
}

.gw-btn-remove:hover {
    background: #c0392b;
    color: #fff;
}

/* Loading */
.gw-loading {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #888;
    font-size: 0.9rem;
}

.gw-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #ddd;
    border-top-color: #e2b23c;
    border-radius: 50%;
    animation: gw-spin 0.7s linear infinite;
}

@keyframes gw-spin {
    to { transform: rotate(360deg); }
}

/* Active Notice */
.gw-active-notice {
    margin-top: 12px;
    background: #d4edda;
    color: #155724;
    padding: 10px 16px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
}

/* Checkout Row */
.gw-checkout-row th,
.gw-checkout-row td {
    font-weight: 500;
}

/* Order Section */
.gw-order-section {
    margin-top: 24px;
    padding: 16px;
    background: #fffdf0;
    border: 1px solid #f0e0b0;
    border-radius: 8px;
}

.gw-order-section h2 {
    font-size: 1rem;
    margin-bottom: 12px;
}

/* Admin Order Box */
.gw-admin-order-box {
    background: #fffdf0;
    border: 1px solid #e2b23c;
    border-radius: 6px;
    padding: 12px;
    margin-top: 12px;
}

.gw-admin-order-box h4 {
    margin: 0 0 8px;
    font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 600px) {
    .gw-wrap-header {
        flex-wrap: wrap;
    }
    .gw-qty-row {
        flex-direction: column;
        align-items: flex-start;
    }
    .gw-total-label {
        margin-left: 0;
    }
}
