/**
 * Castle Club Currency Lock - Styles
 *
 * @package CastleClub_Currency_Lock
 * @since 1.0.0
 */

/* ==========================================================================
   Notice Styles
   ========================================================================== */

.woocommerce-error.ccl-js-notice,
.woocommerce-notice.ccl-js-notice {
    position: relative;
    padding: 15px 40px 15px 20px;
    margin-bottom: 20px;
    border-radius: 4px;
    font-size: 14px;
    line-height: 1.5;
    animation: ccl-slide-down 0.3s ease-out;
}

@keyframes ccl-slide-down {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ccl-notice-dismiss {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    font-size: 20px;
    line-height: 1;
    color: inherit;
    cursor: pointer;
    opacity: 0.7;
    padding: 5px;
}

.ccl-notice-dismiss:hover {
    opacity: 1;
}

/* ==========================================================================
   Checkout Currency Notice
   ========================================================================== */

.ccl-checkout-notice {
    padding: 20px;
    margin-bottom: 25px;
    border-radius: 6px;
    border-left: 4px solid;
}

.ccl-checkout-notice.ccl-btc-notice {
    background-color: #fff8e6;
    border-color: #f7931a;
}

.ccl-checkout-notice p {
    margin: 0 0 10px;
    color: #333;
}

.ccl-checkout-notice p:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   BTC Auction Badge
   ========================================================================== */

.ccl-btc-auction-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: linear-gradient(135deg, #f7931a 0%, #ff9500 100%);
    color: #ffffff;
    border-radius: 30px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 15px;
    box-shadow: 0 2px 8px rgba(247, 147, 26, 0.35);
}

.ccl-btc-icon {
    font-size: 18px;
    font-weight: bold;
}

/* ==========================================================================
   BTC Payment Info Box
   ========================================================================== */

.ccl-btc-payment-info {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 20px;
    margin: 20px 0;
    margin-top: 0;
}

.ccl-btc-payment-info h4 {
    margin: 0 0 10px;
    color: #333;
    font-size: 16px;
}

.ccl-btc-payment-info p {
    margin: 0;
    color: #555;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 5px;
}
.ccl-exchange-rate-display {
    margin-top: 15px;
}
/* ==========================================================================
   Exchange Rate Display
   ========================================================================== */

.ccl-exchange-rate {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-weight: 500;
}

.ccl-approx {
    color: #666;
    font-size: 0.9em;
}

.ccl-exchange-error {
    color: #999;
    font-style: italic;
}

/* Product Exchange Info */
.ccl-product-exchange-info {
    background: #f0f8f0;
    border: 1px solid #c3e6c3;
    border-radius: 6px;
    padding: 15px;
    margin: 15px 0;
}

.ccl-exchange-label {
    font-size: 12px;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 0 0 8px;
}

.ccl-exchange-values {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.ccl-exchange-usd,
.ccl-exchange-cad {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.ccl-exchange-note {
    margin: 10px 0 0;
    color: #555;
    font-weight: 600;
    font-size: 13px;
    line-height: 1.5;
}

.ccl-exchange-note.ccl-tax-note {
    margin-top: 5px;
}

/* ==========================================================================
   Price Converter Widget
   ========================================================================== */

.ccl-price-converter {
    background: #ffffff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    max-width: 350px;
}

.ccl-converter-input {
    margin-bottom: 15px;
}

.ccl-converter-input label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #333;
    margin-bottom: 5px;
}

.ccl-converter-input input {
    width: 100%;
    padding: 10px 12px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

.ccl-converter-input input:focus {
    outline: none;
    border-color: #f7931a;
    box-shadow: 0 0 0 2px rgba(247, 147, 26, 0.2);
}

.ccl-converter-results {
    background: #f8f9fa;
    border-radius: 4px;
    padding: 15px;
}

.ccl-result-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.ccl-result-row:last-child {
    border-bottom: none;
}

.ccl-currency-label {
    font-weight: 600;
    color: #555;
}

.ccl-currency-value {
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

.ccl-converter-updated {
    text-align: center;
    margin-top: 10px;
}

.ccl-converter-updated small {
    color: #888;
    font-size: 11px;
}

/* ==========================================================================
   Rate Ticker
   ========================================================================== */

.ccl-rate-ticker {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 10px 0;
}

.ccl-ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.ccl-ticker-prefix {
    color: #666;
    font-size: 13px;
}

.ccl-ticker-rate {
    font-weight: 600;
    color: #333;
}

/* ==========================================================================
   Auction BTC Info
   ========================================================================== */

.ccl-auction-btc-info {
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 15px;
    margin: 15px 0;
}

.ccl-info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px dashed #ddd;
}

.ccl-info-row:last-child {
    border-bottom: none;
}

.ccl-info-row.ccl-current-bid {
    background: #fff8e6;
    margin: 0 -15px;
    padding: 10px 15px;
    border-bottom: 1px dashed #ddd;
}

.ccl-info-row .ccl-label {
    color: #555;
    font-size: 13px;
}

.ccl-info-row .ccl-value {
    font-weight: 600;
    color: #333;
    font-size: 15px;
}

/* ==========================================================================
   Currency Switcher Disabled Notice
   ========================================================================== */

.ccl-switcher-disabled {
    padding: 12px 15px;
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 4px;
    color: #856404;
    font-size: 13px;
    text-align: center;
    margin: 10px 0;
}

/* ==========================================================================
   Cart Mode Body Classes
   ========================================================================== */

/* Hide currency switcher when BTC cart */
body.ccl-btc-cart-mode .yay-currency-switcher,
body.ccl-btc-cart-mode .yaycurrency-widget,
body.ccl-btc-cart-mode .yay-currency-widget,
body.ccl-btc-cart-mode .yaycurrency-switcher,
body.ccl-btc-cart-mode [class*="yaycurrency"],
body.ccl-btc-cart-mode .ccl-disabled {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* BTC indicator badge */
.ccl-btc-indicator {
    display: inline-block;
    background: #f7931a;
    color: #ffffff;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    margin-left: 8px;
    vertical-align: middle;
}

/* ==========================================================================
   WooCommerce Cart Page Notices
   ========================================================================== */

.woocommerce-cart .ccl-checkout-notice,
.woocommerce-checkout .ccl-checkout-notice {
    margin-bottom: 30px;
}

/* Cart item BTC indicator */
.woocommerce-cart-form .product-name .ccl-btc-indicator,
.woocommerce-mini-cart-item .ccl-btc-indicator {
    margin-left: 5px;
}

/* ==========================================================================
   Responsive Styles
   ========================================================================== */

@media screen and (max-width: 768px) {
    .ccl-btc-auction-badge {
        font-size: 12px;
        padding: 6px 12px;
    }

    .ccl-price-converter {
        max-width: 100%;
    }

    .ccl-exchange-values {
        flex-direction: column;
        gap: 8px;
    }

    .ccl-rate-ticker {
        flex-direction: column;
        gap: 10px;
    }

    .ccl-info-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .ccl-btc-auction-badge,
    .ccl-price-converter,
    .ccl-rate-ticker {
        display: none !important;
    }
}

/* ==========================================================================
   Bid Increment Field Styles (BTC Decimal Support)
   ========================================================================== */

/* Admin bid increment field styling */
#woo_ua_bid_increment {
    width: 200px;
}

/* Frontend bid input fields */
.uwa_auction_form input[type="number"],
#uwa_bid_value,
#uwa_bid_value_direct,
#uwa_auction_sec_custom_field {
    -moz-appearance: textfield; /* Firefox */
}

.uwa_auction_form input[type="number"]::-webkit-outer-spin-button,
.uwa_auction_form input[type="number"]::-webkit-inner-spin-button,
#uwa_bid_value::-webkit-outer-spin-button,
#uwa_bid_value::-webkit-inner-spin-button,
#uwa_bid_value_direct::-webkit-outer-spin-button,
#uwa_bid_value_direct::-webkit-inner-spin-button,
#uwa_auction_sec_custom_field::-webkit-outer-spin-button,
#uwa_auction_sec_custom_field::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* BTC auction product bid input styling */
.product-type-auction .uwa_auction_form input[type="number"] {
    font-size: 16px;
    padding: 10px 12px;
    border: 2px solid #ddd;
    border-radius: 4px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.product-type-auction .uwa_auction_form input[type="number"]:focus {
    border-color: #f7931a;
    outline: none;
    box-shadow: 0 0 0 3px rgba(247, 147, 26, 0.2);
}

/* Hint text for decimal bid values */
.uwa_inc_price_hint {
    margin-top: 8px;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 4px;
    font-size: 13px;
}

.uwa_inc_price_hint small {
    color: #555;
}

/* Currency symbol styling in bid forms */
.uwa_currency {
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin-right: 5px;
}

/* Mobile responsive adjustments for bid inputs */
@media screen and (max-width: 768px) {
    .product-type-auction .uwa_auction_form input[type="number"] {
        width: 100%;
        font-size: 18px; /* Larger for easier mobile input */
        padding: 12px 15px;
    }

    .uwa_inc_price_hint {
        font-size: 12px;
    }
}

/* ==========================================================================
   Admin Bid Increment Field Enhancement
   ========================================================================== */

/* Admin panel bid increment field */
.form-field.woo_ua_bid_increment_field input {
    max-width: 200px;
}

.form-field.woo_ua_bid_increment_field .woocommerce-help-tip {
    margin-left: 8px;
}

/* Visual indicator that decimal values are allowed */
#woo_ua_bid_increment::placeholder {
    color: #999;
    font-style: italic;
}

/* Success state for valid decimal input */
#woo_ua_bid_increment.valid-decimal {
    border-color: #28a745;
    background-color: #f0fff4;
}
