/* ============================================================
   Feirix Shipping Estimator Widget
   ============================================================ */

.feirix-shipping-estimator {
    margin: 20px 0 16px;
    padding: 16px 18px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    background: #fafafa;
    font-size: 14px;
}

.fse-title {
    margin: 0 0 12px;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #333;
}

/* --- Selector row --- */
.fse-selector-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 12px;
}

#fse-country-select {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 13px;
    background: #fff;
    cursor: pointer;
    color: #333;
}

#fse-country-select:focus {
    outline: none;
    border-color: #fcb800;
    box-shadow: 0 0 0 2px rgba(252, 184, 0, 0.2);
}

/* --- Result area --- */
.fse-result {
    min-height: 30px;
    transition: opacity 0.2s;
}

.fse-result--loading {
    opacity: 0.65;
}

.fse-placeholder {
    color: #888;
    margin: 0;
    font-size: 13px;
}

/* --- Table --- */
.fse-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin-bottom: 6px;
}

.fse-table thead th {
    text-align: right;
    padding: 4px 8px;
    font-weight: 600;
    color: #555;
    border-bottom: 2px solid #e0e0e0;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.fse-table thead th:first-child {
    text-align: left;
}

.fse-table tbody td {
    padding: 7px 8px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
}

.fse-table tbody tr:last-child td {
    border-bottom: none;
}

.fse-table tbody td:first-child {
    color: #444;
}

.fse-table tbody td:not(:first-child) {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* Total row emphasis */
.fse-table tbody tr:nth-last-child(2) td {
    padding-top: 9px;
    padding-bottom: 9px;
    border-top: 2px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
    font-size: 14px;
}

/* Delivery row */
.fse-delivery-row td {
    padding-top: 8px !important;
    color: #333;
}

/* --- Badges & notes --- */
.fse-free {
    color: #2a7d4f;
    font-weight: 600;
}

.fse-note-badge {
    font-size: 10px;
    background: #f0f0f0;
    color: #777;
    padding: 1px 5px;
    border-radius: 3px;
    vertical-align: middle;
    margin-left: 4px;
    font-weight: 500;
}

.fse-rate-note {
    margin: 6px 0 4px;
    font-size: 11px;
    color: #999;
}

.fse-rate-source {
    color: #bbb;
}

.fse-rate-unavail {
    color: #b06000;
}

.fse-island-note {
    margin: 4px 0 0;
    font-size: 12px;
    color: #b06000;
}

/* --- Spinner --- */
.fse-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid #ccc;
    border-top-color: #fcb800;
    border-radius: 50%;
    animation: fse-spin 0.7s linear infinite;
    vertical-align: middle;
    margin-right: 4px;
}

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

/* --- Error state --- */
.fse-result--error {
    color: #c0392b;
    font-size: 13px;
    padding: 4px 0;
}

/* --- Mobile --- */
@media (max-width: 480px) {
    .feirix-shipping-estimator {
        padding: 12px 14px;
    }
    .fse-table font-size {
        font-size: 12px;
    }
}
