/**
 * BD Gift Cards - Cart/Checkout Styles
 */

.bdgc-apply-gift-card,
.bdgc-apply-gift-card-checkout {
    margin: 20px 0;
    padding: 15px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

/* Toggle link */
.bdgc-toggle-form {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #333;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    padding: 8px 0;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.bdgc-toggle-form:hover {
    color: #000;
    text-decoration: none;
}

.bdgc-gift-icon {
    font-size: 18px;
    line-height: 1;
    filter: grayscale(1);
    opacity: 0.7;
}

.bdgc-gift-icon.bdgc-icon-color {
    filter: none;
    opacity: 1;
}

.bdgc-expand-icon {
    margin-left: auto;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.bdgc-expand-icon::after {
    content: '';
    width: 8px;
    height: 8px;
    border-right: 2px solid #666;
    border-bottom: 2px solid #666;
    transform: rotate(45deg);
    margin-top: -3px;
}

.bdgc-toggle-form.active .bdgc-expand-icon {
    transform: rotate(180deg);
}

/* Touch feedback for mobile */
@media (hover: none) and (pointer: coarse) {
    .bdgc-toggle-form {
        padding: 12px 0;
    }

    .bdgc-toggle-form:active {
        background: rgba(0, 0, 0, 0.05);
        border-radius: 6px;
        margin: 0 -10px;
        padding: 12px 10px;
    }
}

.bdgc-gift-card-form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-start;
}

.bdgc-gift-card-form .form-row {
    display: flex;
    gap: 10px;
    margin: 0;
    flex-wrap: wrap;
}

.bdgc-gift-card-form input[type="text"] {
    flex: 1;
    min-width: 200px;
    padding: 10px 15px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.bdgc-gift-card-form button {
    padding: 10px 20px;
    white-space: nowrap;
}

.bdgc-message {
    width: 100%;
    margin-top: 10px;
    padding: 10px;
    border-radius: 4px;
    font-weight: 500;
}

.bdgc-message:empty {
    display: none;
}

.bdgc-message.success {
    color: #2e7d32;
    background: #e8f5e9;
    border: 1px solid #c8e6c9;
}

.bdgc-message.error {
    color: #c62828;
    background: #ffebee;
    border: 1px solid #ffcdd2;
}

/* Applied gift cards in cart totals */
.bdgc-gift-card-details th {
    font-weight: normal;
    font-size: 0.9em;
    color: #666;
}

.bdgc-gift-card-details code,
.bdgc-code-chip {
    display: inline-block;
    font-size: 11px;
    font-family: inherit;
    font-weight: 600;
    background: linear-gradient(135deg, #7d9a8c 0%, #5a7d6a 100%);
    color: #fff;
    padding: 4px 10px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.bdgc-remaining-balance {
    font-size: 0.85em;
    color: #666;
    margin-right: 10px;
}

.bdgc-remove-gift-card {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.bdgc-remove-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    background: #dc3545;
    color: #fff;
    border-radius: 50%;
    font-size: 14px;
    font-weight: bold;
    line-height: 1;
    transition: background 0.2s;
}

.bdgc-remove-gift-card:hover .bdgc-remove-icon {
    background: #c82333;
}

/* Checkout specific */
.bdgc-checkout-gift-card .bdgc-apply-gift-card-checkout {
    margin: 10px 0;
}

.bdgc-checkout-gift-card .bdgc-gift-card-form {
    margin-top: 15px;
}
