/**
 * Quodr Gift Cards Checkbox - Frontend Styles
 */

/* Product Selector */
.qgcc-product-selector {
    max-width: 400px;
    padding: 25px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

/* Price Section */
.qgcc-product-price {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.qgcc-price-label {
    font-size: 14px;
    color: #666;
    margin-right: 8px;
}

.qgcc-price-value {
    font-size: 24px;
    font-weight: 700;
    color: #333;
}

/* Quantity Section */
.qgcc-quantity-section {
    margin-bottom: 20px;
}

.qgcc-quantity-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    margin-bottom: 10px;
}

.qgcc-quantity-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.qgcc-qty-btn {
    width: 44px;
    height: 44px;
    border: 1px solid #ddd;
    background: #f8f9fa;
    font-size: 20px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
}

.qgcc-qty-btn:hover {
    background: #e9ecef;
}

.qgcc-qty-btn:active {
    background: #ddd;
}

.qgcc-qty-minus {
    border-radius: 8px 0 0 8px;
}

.qgcc-qty-plus {
    border-radius: 0 8px 8px 0;
}

.qgcc-quantity-input {
    width: 60px;
    height: 44px;
    border: 1px solid #ddd;
    border-left: none;
    border-right: none;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    -moz-appearance: textfield;
}

.qgcc-quantity-input::-webkit-outer-spin-button,
.qgcc-quantity-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Split Section */
.qgcc-split-section {
    margin-bottom: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.qgcc-split-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.qgcc-split-icon {
    font-size: 24px;
}

.qgcc-split-text {
    font-size: 14px;
    color: #555;
    line-height: 1.4;
}

.qgcc-split-controls {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.qgcc-split-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.qgcc-split-item label {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.qgcc-split-qty-controls {
    display: flex;
    align-items: center;
    gap: 0;
}

.qgcc-split-btn {
    width: 32px;
    height: 32px;
    border: 1px solid #ddd;
    background: #fff;
    font-size: 16px;
    font-weight: 500;
    color: #333;
    cursor: pointer;
    transition: all 0.2s ease;
}

.qgcc-split-btn:first-child {
    border-radius: 6px 0 0 6px;
}

.qgcc-split-btn:last-child {
    border-radius: 0 6px 6px 0;
}

.qgcc-split-btn:hover {
    background: #f0f0f0;
}

.qgcc-for-me-input,
.qgcc-to-gift-input {
    width: 50px;
    height: 32px;
    border: 1px solid #ddd;
    border-left: none;
    border-right: none;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    -moz-appearance: textfield;
}

.qgcc-for-me-input::-webkit-outer-spin-button,
.qgcc-for-me-input::-webkit-inner-spin-button,
.qgcc-to-gift-input::-webkit-outer-spin-button,
.qgcc-to-gift-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* Gift Checkbox */
.qgcc-gift-checkbox-section {
    margin-bottom: 20px;
}

.qgcc-gift-checkbox-label {
    display: flex;
    align-items: center;
    padding: 15px;
    background: #fffbeb;
    border: 2px solid #fbbf24;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.qgcc-gift-checkbox-label:hover {
    background: #fef3c7;
}

.qgcc-is-gift-checkbox {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    accent-color: #d97706;
}

.qgcc-gift-checkbox-text {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 500;
    color: #92400e;
}

.qgcc-gift-icon {
    font-size: 20px;
}

/* Total Section */
.qgcc-total-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    margin-bottom: 20px;
    background: #f0f9ff;
    border-radius: 8px;
}

.qgcc-total-label {
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

.qgcc-total-value {
    font-size: 20px;
    font-weight: 700;
    color: #007cba;
}

/* Add to Cart Button */
.qgcc-add-to-cart-btn {
    width: 100%;
    padding: 15px 25px;
    background: #000;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.qgcc-add-to-cart-btn:hover {
    background: #333;
    transform: translateY(-1px);
}

.qgcc-add-to-cart-btn:active {
    transform: translateY(0);
}

.qgcc-add-to-cart-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.qgcc-btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.qgcc-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: qgcc-spin 0.8s linear infinite;
}

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

/* Message */
.qgcc-message {
    margin-top: 15px;
    padding: 12px 15px;
    border-radius: 6px;
    font-size: 14px;
    text-align: center;
}

.qgcc-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.qgcc-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Error message */
.qgcc-error {
    padding: 15px;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
}

/* Cart Badge */
.qgcc-cart-badge {
    display: inline-block;
    padding: 3px 10px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 20px;
    margin-left: 8px;
    vertical-align: middle;
}

.qgcc-badge-gift {
    background: #fef3c7;
    color: #92400e;
}

.qgcc-badge-personal {
    background: #dbeafe;
    color: #1e40af;
}

/* Order Details Codes */
.qgcc-order-codes {
    margin-top: 10px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 6px;
}

.qgcc-codes-list {
    list-style: none;
    margin: 10px 0 0 0;
    padding: 0;
}

.qgcc-codes-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.qgcc-codes-list li:last-child {
    border-bottom: none;
}

.qgcc-code {
    font-family: monospace;
    font-size: 14px;
    font-weight: 600;
    color: #007cba;
    background: #e3f2fd;
    padding: 4px 8px;
    border-radius: 4px;
}

.qgcc-code-type {
    font-size: 12px;
    color: #666;
}

.qgcc-gift-badge {
    font-size: 16px;
}

.qgcc-download-link {
    font-size: 12px;
    color: #007cba;
    text-decoration: none;
    padding: 4px 8px;
    background: #f0f9ff;
    border-radius: 4px;
}

.qgcc-download-link:hover {
    background: #dbeafe;
}

/* Responsive */
@media (max-width: 480px) {
    .qgcc-product-selector {
        padding: 20px 15px;
    }

    .qgcc-split-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .qgcc-split-qty-controls {
        width: 100%;
        justify-content: flex-end;
    }
}
