/**
 * WP Show USD Forge - Frontend Stylesheet
 * Responsive, clean and compatible with WooCommerce themes (Storefront, Astra, Hello, Kadence, Divi, Flatsome, etc.)
 */

.wpsu-usd-reference {
    font-size: var(--wpsu-font-size, 13px);
    color: var(--wpsu-text-color, #64748b);
    line-height: 1.35;
    transition: opacity 0.2s ease;
    user-select: text;
}

/* Positions */
.wpsu-usd-reference.wpsu-pos-below {
    display: block;
    margin-top: 3px;
    clear: both;
}

.wpsu-usd-reference.wpsu-pos-inline {
    display: inline-block;
    margin-left: 6px;
    vertical-align: baseline;
}

/* Badge Styles */
.wpsu-usd-reference.wpsu-style-subtle {
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 6px;
    font-weight: 500;
    border: 1px solid #e2e8f0;
}

.wpsu-usd-reference.wpsu-style-pill {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    padding: 3px 12px;
    border-radius: 9999px;
    font-weight: 600;
}

.wpsu-usd-reference.wpsu-style-clean_text {
    background: transparent;
    border: none;
    padding: 0;
}

/* Tooltip */
.wpsu-tooltip {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-left: 4px;
    cursor: help;
    vertical-align: middle;
}

.wpsu-info-icon {
    width: 14px;
    height: 14px;
    color: #94a3b8;
    transition: color 0.15s ease;
}

.wpsu-tooltip:hover .wpsu-info-icon,
.wpsu-tooltip:focus .wpsu-info-icon {
    color: #3b82f6;
}

.wpsu-tooltip-content {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background-color: #0f172a;
    color: #ffffff;
    text-align: center;
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 11.5px;
    font-weight: 400;
    line-height: 1.35;
    white-space: normal;
    width: max-content;
    max-width: 220px;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
    pointer-events: none;
}

.wpsu-tooltip-content::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #0f172a transparent transparent transparent;
}

.wpsu-tooltip:hover .wpsu-tooltip-content,
.wpsu-tooltip:focus .wpsu-tooltip-content {
    visibility: visible;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Cart & Checkout Totals Row */
.order-usd-reference-row th,
.order-usd-reference-row td {
    padding: 10px 12px !important;
}

.order-usd-reference-row {
    background: #f8fafc;
}

.order-usd-reference-row strong {
    color: #1e293b;
    font-size: 14.5px;
}

.wpsu-totals-note {
    display: block;
    font-size: 11px;
    color: #64748b;
    margin-top: 3px;
    font-weight: normal;
}

/* Legal Disclaimer Boxes */
.wpsu-disclaimer-box {
    margin: 16px 0 20px 0;
    padding: 12px 18px;
    border-radius: 8px;
    font-size: 13.5px;
    line-height: 1.5;
}

.wpsu-disclaimer-box strong {
    font-weight: 600;
}

.wpsu-disclaimer-callout_blue {
    background-color: #eff6ff;
    border: 1px solid #bfdbfe;
    color: #1e40af;
}

.wpsu-disclaimer-callout_amber {
    background-color: #fffbeb;
    border: 1px solid #fde68a;
    color: #92400e;
}

.wpsu-disclaimer-minimal {
    background-color: #f8fafc;
    border-left: 4px solid #3b82f6;
    color: #334155;
    border-radius: 0 8px 8px 0;
}

/* Frontend Calculator Widget */
.wpsu-calculator-widget {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    max-width: 420px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.04);
    font-family: inherit;
    margin: 20px 0;
}

.wpsu-calc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 12px;
    margin-bottom: 16px;
    gap: 10px;
    flex-wrap: wrap;
}

.wpsu-calc-header h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    color: #1e293b;
}

.wpsu-calc-rate-badge {
    background: #e0f2fe;
    color: #0369a1;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 20px;
}

.wpsu-calc-group label,
.wpsu-calc-result label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wpsu-calc-input-wrap {
    display: flex;
    align-items: center;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    overflow: hidden;
    background: #ffffff;
}

.wpsu-calc-prefix {
    background: #f1f5f9;
    color: #475569;
    padding: 10px 14px;
    font-weight: 700;
    font-size: 14px;
}

.wpsu-calc-clp-input {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    padding: 10px 14px !important;
    font-size: 16px !important;
    font-weight: 700 !important;
    width: 100% !important;
    color: #0f172a !important;
}

.wpsu-calc-arrow {
    text-align: center;
    font-size: 18px;
    color: #94a3b8;
    margin: 8px 0;
}

.wpsu-calc-usd-value {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 20px;
    font-weight: 800;
    color: #059669;
    text-align: center;
}

.wpsu-calc-footer {
    margin-top: 14px;
    text-align: center;
    border-top: 1px solid #f1f5f9;
    padding-top: 10px;
}

.wpsu-calc-footer small {
    color: #94a3b8;
    font-size: 11px;
    line-height: 1.3;
    display: block;
}
