/**
 * Factor4 WooCommerce Gift Cards - Frontend Styles
 * 
 * Styles for the gift card functionality in cart and checkout.
 */

/* Gift Card Form Container */
.f4gc-gift-card-form-container {
    margin: 20px 0;
    padding: 15px;
    border: 1px solid #e5e5e5;
    background-color: #f8f8f8;
    border-radius: 4px;
}

.f4gc-gift-card-form-container h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 16px;
    font-weight: 600;
}

/* Progressive Disclosure Toggle */
.f4gc-gift-card-toggle {
    margin-bottom: 15px;
}

.f4gc-toggle-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-weight: 600;
    font-size: 16px;
    user-select: none;
}

.f4gc-has-gift-card-checkbox {
    width: 18px;
    height: 18px;
    margin: 0 10px 0 0;
    cursor: pointer;
    accent-color: #2271b1;
}

.f4gc-toggle-text {
    cursor: pointer;
}

/* Gift Card Form */
.f4gc-gift-card-form .form-row {
    margin-bottom: 10px;
}

.f4gc-gift-card-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.f4gc-gift-card-form input[type="text"],
.f4gc-gift-card-form input[type="password"],
.f4gc-gift-card-form input[type="number"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

/* Gift Card Actions */
.f4gc-gift-card-actions {
    margin: 15px 0;
}

.f4gc-gift-card-actions button {
    margin-right: 10px;
}

/* Gift Card Balance Container */
.f4gc-gift-card-balance-container {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e5e5e5;
}

.f4gc-gift-card-balance {
    margin-bottom: 10px;
    font-weight: 600;
}

.f4gc-gift-card-amount-container {
    margin-bottom: 15px;
}

/* Apply Gift Card button spacing - 19px to match Check Balance separation */
button.f4gc-apply-gift-card,
button.f4gc-apply-gift-card-checkout,
button.f4gc-apply-gift-card-funnelkit,
button.f4gc-apply-gift-card-funnelkit-checkout,
.f4gc-gift-card-balance-container > button.f4gc-apply-gift-card-checkout,
.f4gc-gift-card-balance-container > button.f4gc-apply-gift-card-funnelkit-checkout,
.wfacp-button.f4gc-apply-gift-card-funnelkit-checkout,
.button.f4gc-apply-gift-card-checkout {
    margin-top: 19px !important;
}

/* Messages */
.f4gc-gift-card-message {
    margin-top: 15px;
}

.f4gc-message {
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 10px;
}

.f4gc-success-message {
    background-color: #dff0d8;
    color: #3c763d;
    border: 1px solid #d6e9c6;
}

.f4gc-error-message {
    background-color: #f2dede;
    color: #a94442;
    border: 1px solid #ebccd1;
}

.f4gc-info-message {
    background-color: #d9edf7;
    color: #31708f;
    border: 1px solid #bce8f1;
}

/* Applied Gift Card */
.f4gc-gift-card-applied {
    background-color: #dff0d8;
    padding: 10px;
    border-radius: 4px;
    border: 1px solid #d6e9c6;
}

/* Button styled as link */
.button-as-link {
    background: none !important;
    border: none !important;
    padding: 0 !important;
    text-decoration: underline;
    cursor: pointer;
    color: #0073aa;
    font-size: inherit;
    font-weight: normal;
    line-height: inherit;
    box-shadow: none !important;
    margin: 0 !important;
    min-height: auto !important;
    height: auto !important;
}

.button-as-link:hover {
    color: #00a0d2;
    text-decoration: underline;
}

.button-as-link:focus {
    outline: thin dotted;
    box-shadow: none !important;
}

.f4gc-gift-card-applied p {
    margin: 0;
    color: #3c763d;
}

.f4gc-remove-gift-card {
    margin-left: 10px;
    font-size: 12px;
    font-weight: bold;
    color: #E02020;
    text-decoration: underline;
}

.f4gc-remove-gift-card:hover {
    color: #c01818;
    text-decoration: underline;
}

/* FunnelKit Integration */
.f4gc-funnelkit-container .wfacp-form-control-wrapper,
.f4gc-funnelkit-checkout-container .wfacp-form-control-wrapper {
    margin-bottom: 15px;
}

/* Checkout Integration */
.f4gc-checkout-container {
    margin-bottom: 30px;
}

/* Order Review */
tr.f4gc-applied-gift-card th,
tr.f4gc-applied-gift-card td {
    padding: 10px 0;
    border-top: 1px solid #e5e5e5;
}
