/**
 * Cirrusly Shipping Manager - Public Styles
 */

/* ========================================
   Enhanced Shipping Method Display
   ======================================== */

/* Shipping option container */
.cirrusly-shipping-option {
    display: flex;
    flex-direction: column;
    width: 100%;
}

/* Header row with logos, name, and price */
.cirrusly-shipping-header {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Carrier logos container */
.cirrusly-shipping-logos {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

/* Individual carrier logo */
.cirrusly-carrier-logo {
    height: 18px;
    width: auto;
    max-width: 36px;
    object-fit: contain;
    vertical-align: middle;
}

/* Shipping method name */
.cirrusly-shipping-name {
    flex: 1;
    font-weight: 500;
}

/* Price display */
.cirrusly-shipping-price {
    font-weight: 600;
    margin-left: auto;
}

.cirrusly-shipping-price.cirrusly-free {
    color: #2e7d32;
    font-weight: 700;
}

/* Details line below header (delivery estimate + carrier note) */
.cirrusly-shipping-details {
    font-size: 0.85em;
    color: #666;
    margin-top: 4px;
    margin-left: 0;
    line-height: 1.4;
}

/* Delivery date estimate */
.cirrusly-delivery-estimate {
    color: #1976d2;
    font-weight: 500;
}

/* Carrier description note */
.cirrusly-carrier-note {
    color: #666;
}

/* Legacy description class (for backwards compatibility) */
.cirrusly-shipping-description {
    font-size: 0.85em;
    color: #666;
    margin-top: 4px;
    margin-left: 0;
    line-height: 1.4;
}

/* WooCommerce checkout overrides */
.woocommerce-checkout .cirrusly-shipping-option {
    padding: 4px 0;
}

.woocommerce-checkout ul#shipping_method li label {
    display: flex;
    align-items: flex-start;
}

.woocommerce-checkout ul#shipping_method li .cirrusly-shipping-option {
    margin-left: 0;
}

/* Cart shipping display */
.woocommerce-cart .cirrusly-shipping-option {
    padding: 4px 0;
}

/* ========================================
   Product Page Delivery Estimate
   ======================================== */

/* Stock status styling (Google Merchant Center compliant) */
p.stock {
    font-weight: 600;
    margin-bottom: 10px;
}

p.stock.in-stock {
    color: #2e7d32;
}

p.stock.in-stock.low-stock {
    color: #f57c00;
}

p.stock.out-of-stock {
    color: #c62828;
}

/* Stock availability with delivery estimate */
.stock .cirrusly-delivery-estimate {
    display: inline;
    color: #1976d2;
    font-weight: 500;
}

/* Warehouse availability display */
.cirrusly-warehouse-availability {
    font-size: 0.9em;
    color: #666;
    margin: 5px 0 10px 0;
}

.cirrusly-warehouse-label {
    font-weight: 500;
    color: #333;
    margin-right: 5px;
}

/* Delivery estimate on stock display */
.woocommerce div.product p.stock {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
}

.woocommerce div.product p.stock .cirrusly-delivery-estimate {
    font-size: 0.9em;
}

/* ========================================
   Compact Stock Status Display
   ======================================== */

/* Combined stock status line with indicator */
.cirrusly-stock-status {
    --stock-in: #2e7d32;
    --stock-low: #f57c00;
    --stock-out: #c62828;
    --stock-backorder: #f57c00;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 0.95em;
    font-weight: 500;
    margin: 10px 0 8px 0;
    padding: 8px 12px;
    background: #f8f9fa;
    border-radius: 4px;
}

/* Stock indicator icons */
.cirrusly-indicator {
    font-size: 1.1em;
    line-height: 1;
}

/* In stock - green */
.cirrusly-stock-status.in-stock .cirrusly-indicator {
    color: var(--stock-in);
}

.cirrusly-stock-status.in-stock .cirrusly-status-text {
    color: var(--stock-in);
}

/* Low stock - orange */
.cirrusly-stock-status.low-stock .cirrusly-indicator {
    color: var(--stock-low);
}

.cirrusly-stock-status.low-stock .cirrusly-status-text {
    color: var(--stock-low);
}

/* Out of stock - red */
.cirrusly-stock-status.out-of-stock .cirrusly-indicator {
    color: var(--stock-out);
}

.cirrusly-stock-status.out-of-stock .cirrusly-status-text {
    color: var(--stock-out);
}

/* Backorder - orange with clock */
.cirrusly-stock-status.backorder .cirrusly-indicator {
    color: var(--stock-backorder);
}

.cirrusly-stock-status.backorder .cirrusly-status-text {
    color: var(--stock-backorder);
}

/* Stock status text */
.cirrusly-status-text {
    font-weight: 600;
}

/* Separator bullet */
.cirrusly-separator {
    color: #999;
    margin: 0 2px;
}

/* Warehouse/location text */
.cirrusly-warehouses {
    color: #666;
    font-weight: 400;
}

/* ZIP input for delivery estimate lookup */
.cirrusly-zip-lookup {
    margin-top: 12px;
    padding: 12px 15px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

.cirrusly-zip-lookup label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: #333;
}

.cirrusly-zip-lookup-form {
    display: flex;
    gap: 8px;
    align-items: center;
}

.cirrusly-zip-lookup input[type="text"] {
    width: 100px;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 14px;
}

.cirrusly-zip-lookup button {
    padding: 8px 15px;
    background: #1976d2;
    color: #fff;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.2s;
}

.cirrusly-zip-lookup button:hover {
    background: #1565c0;
}

.cirrusly-zip-lookup button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.cirrusly-zip-result {
    margin-top: 10px;
    padding: 10px;
    background: #e3f2fd;
    border-radius: 3px;
    color: #1976d2;
    font-weight: 500;
}

.cirrusly-zip-result.error {
    background: #ffebee;
    color: #c62828;
}

/* ========================================
   Public Tracking Page Styles
   ======================================== */

/* Placeholder for future tracking page styles */
/* Currently inline in class-tracking-page.php */

/* ========================================
   Estimate Note & Delivery Widget
   ======================================== */

/* Delivery estimate note (fine print) */
.cirrusly-estimate-note {
    margin: 8px 0 0 0;
    font-size: 11px;
    color: #888;
    font-style: italic;
}

/* Combined delivery widget container */
.cirrusly-delivery-widget {
    margin-top: 8px;
}

/* ZIP lookup within combined widget */
.cirrusly-delivery-widget .cirrusly-zip-lookup {
    margin-top: 0;
    padding: 10px 12px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

.cirrusly-delivery-widget .cirrusly-zip-lookup-form {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

.cirrusly-delivery-widget .cirrusly-zip-label {
    font-weight: 500;
    color: #333;
    font-size: 13px;
}

.cirrusly-delivery-widget .cirrusly-zip-input {
    width: 90px;
    padding: 6px 8px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 13px;
}

.cirrusly-delivery-widget .cirrusly-zip-btn {
    padding: 6px 12px;
    background: #1976d2;
    color: #fff;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 13px;
    transition: background 0.2s;
}

.cirrusly-delivery-widget .cirrusly-zip-btn:hover {
    background: #1565c0;
}

.cirrusly-delivery-widget .cirrusly-zip-result {
    margin-top: 8px;
    padding: 8px 10px;
    background: #e3f2fd;
    border-radius: 3px;
    color: #1976d2;
    font-weight: 500;
    font-size: 13px;
}
