/**
 * Halal Meat Boston Delivery Calculator CSS
 * All the styling for the delivery calculator interface
 */

.hmbdc {
    --hmb-green: #2F4F38;
    --hmb-ink: #0f1a14;
    --hmb-bg: #f6f7f6;
    --hmb-ok: #1f7a3a;
    --hmb-warn: #a23b2a;
    --hmb-sky: #eaf1ed;
    --hmb-gold: #ffd700;
    --hmb-orange: #ff8c00;
    --hmb-free: #f0f9f0;
}

.hmbdc {
    display: block;
    margin: 16px 0;
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Ubuntu, 'Helvetica Neue', Arial;
}

.hmbdc-card {
    border-radius: 18px;
    background: linear-gradient(180deg, var(--hmb-bg), #fff);
    box-shadow: 0 8px 26px rgba(0,0,0,.08);
    padding: 20px;
    border: 1px solid #eff2ef;
}

/* Free Weekend Delivery Banner */
.hmbdc-free-banner {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #1f7a3a, #2F4F38);
    color: #fff;
    padding: 16px;
    border-radius: 14px;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(31,122,58,0.3);
    animation: pulse-free 3s ease-in-out infinite;
}

@keyframes pulse-free {
    0%, 100% { box-shadow: 0 4px 12px rgba(31,122,58,0.3); }
    50% { box-shadow: 0 4px 20px rgba(31,122,58,0.5); }
}

.free-banner-icon {
    font-size: 32px;
    flex-shrink: 0;
}

.free-banner-content {
    flex: 1;
}

.free-banner-title {
    font-size: 18px;
    font-weight: 800;
    margin-bottom: 4px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.free-banner-subtitle {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
    opacity: 0.9;
}

.free-banner-desc {
    font-size: 12px;
    opacity: 0.8;
}

.hmbdc-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.hmbdc-title {
    font-size: 20px;
    font-weight: 800;
    color: var(--hmb-green);
}

.hmbdc-badge {
    font-size: 14px;
    background: var(--hmb-sky);
    color: var(--hmb-green);
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px dashed var(--hmb-green);
}

.hmbdc-form {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-top: 8px;
}

.hmbdc-field {
    display: flex;
    flex-direction: column;
}

.hmbdc-field label {
    font-weight: 700;
    color: var(--hmb-ink);
    margin-bottom: 6px;
}

.hmbdc-field input,
.hmbdc-field select {
    border: 1px solid #dfe5e1;
    border-radius: 12px;
    padding: 10px 12px;
    font-size: 15px;
    background: #fff;
    outline: none;
}

.hmbdc-field input:focus,
.hmbdc-field select:focus {
    border-color: var(--hmb-green);
    box-shadow: 0 0 0 3px rgba(47,79,56,.15);
}

.hmbdc-help {
    font-size: 12px;
    color: #6b7a72;
    margin-top: 6px;
}

.hmbdc-btn {
    grid-column: 1/-1;
    background: var(--hmb-green);
    color: #fff;
    border: none;
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: transform .04s, box-shadow .2s;
}

.hmbdc-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(47,79,56,.25);
}

.hmbdc-meta {
    margin-top: 12px;
    font-size: 14px;
    color: #2b3a33;
}

.hmbdc-result {
    margin-top: 10px;
    padding: 14px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid #e6ede9;
}

.hmbdc-result .ok {
    color: var(--hmb-ok);
    font-weight: 800;
}

.hmbdc-result .warn {
    color: var(--hmb-warn);
    font-weight: 800;
}

.free-hero {
    border: 2px solid #bfe4c6;
    background: var(--hmb-free);
    padding: 12px;
    border-radius: 12px;
    font-weight: 800;
}

.free-hero .big {
    font-size: 18px;
}

.pill {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    border: 1px solid #e2e9e4;
    font-weight: 700;
}

.pill-free {
    background: #e7f6ed;
    border-color: #bfe4c6;
    color: #1c6a33;
}

/* Delivery charges warning styling */
.delivery-charges-warning {
    background: #fff5f5;
    border: 1px solid #dc3545;
    border-radius: 8px;
    padding: 12px;
    margin-top: 12px;
}

.delivery-charges-warning .warning-title {
    color: #dc3545;
    font-weight: 800;
    margin-bottom: 8px;
}

.delivery-charges-warning .warning-amount {
    color: #dc3545;
    font-weight: 800;
    font-size: 16px;
}

/* WhatsApp button styling */
.whatsapp-btn {
    display: inline-block;
    background: #25D366;
    color: #fff;
    text-decoration: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 16px;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(37,211,102,0.3);
}

.whatsapp-btn:hover {
    background: #128C7E;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37,211,102,0.4);
    color: #fff;
}

.whatsapp-btn:active {
    transform: translateY(0);
}

/* Enhanced Policy Section */
.hmbdc-policy {
    margin-top: 14px;
    padding: 16px;
    border: 1px solid #dfe5e1;
    border-radius: 12px;
    background: #fbfdfb;
}

.hmbdc-policy .p-title {
    font-weight: 800;
    color: var(--hmb-green);
    margin-bottom: 12px;
    font-size: 16px;
}

.delivery-options-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 16px;
}

.delivery-option {
    border: 2px solid #e6ede9;
    border-radius: 12px;
    padding: 12px;
    background: #fff;
    transition: all 0.2s;
    margin-bottom: 12px;
}

.delivery-option.weekend {
    border-color: var(--hmb-ok);
    background: linear-gradient(135deg, #f0f9f0, #e8f5e8);
}

.delivery-option.weekday {
    border-color: #dfe5e1;
}

.delivery-option.off-day {
    border-color: #ffcdd2;
    background: linear-gradient(135deg, #fff5f5, #ffe8e8);
    grid-column: 1/-1;
}

.delivery-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.option-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.option-icon {
    font-size: 20px;
}

.option-title {
    font-weight: 700;
    color: var(--hmb-ink);
    flex: 1;
}

.option-badge {
    font-size: 10px;
    font-weight: 800;
    padding: 4px 8px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.option-badge.free {
    background: var(--hmb-ok);
    color: #fff;
}

.option-badge.fee {
    background: #ff8c00;
    color: #fff;
}

.option-badge.off {
    background: #a23b2a;
    color: #fff;
}

.option-days {
    font-size: 12px;
    color: #6b7a72;
    margin-bottom: 6px;
    font-weight: 600;
}

.option-benefits {
    font-size: 11px;
    line-height: 1.4;
    color: #4a5a52;
}

.policy-note {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid #e6ede9;
}

.note-title {
    font-weight: 700;
    color: var(--hmb-green);
    margin-bottom: 6px;
    font-size: 14px;
}

.hmbdc-policy ul {
    margin: 0 0 6px 18px;
    padding: 0;
}

.hmbdc-policy li {
    margin: 4px 0;
    font-size: 13px;
}

.hmbdc-map {
    margin-top: 14px;
}

.hmbdc-map summary {
    cursor: pointer;
    color: var(--hmb-green);
    font-weight: 700;
}

.hmbdc-map img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    border: 1px solid #e1e8e4;
    margin-top: 10px;
}

/* Order Online Button Styling */
.order-online-section {
    margin-top: 20px;
    text-align: center;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 16px;
    border: 2px solid #dee2e6;
}

.order-online-btn {
    display: inline-block;
    background: linear-gradient(135deg, #28a745, #20c997);
    color: #fff;
    text-decoration: none;
    padding: 16px 32px;
    border-radius: 16px;
    font-weight: 800;
    font-size: 18px;
    transition: all 0.3s;
    box-shadow: 0 6px 20px rgba(40,167,69,0.3);
    margin-bottom: 12px;
}

.order-online-btn:hover {
    background: linear-gradient(135deg, #218838, #1ea085);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(40,167,69,0.4);
    color: #fff;
}

.order-online-btn:active {
    transform: translateY(-1px);
}

.order-online-desc {
    font-size: 14px;
    color: #6c757d;
    font-weight: 500;
}

/* Toast notifications */
.hmbdc-toasts {
    position: fixed;
    right: 18px;
    bottom: 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    z-index: 9999;
}

.hmbdc-toast {
    min-width: 260px;
    max-width: 360px;
    background: #ffffff;
    border: 1px solid #e4ebe7;
    border-radius: 12px;
    padding: 10px 12px;
    box-shadow: 0 10px 24px rgba(0,0,0,.12);
    font-size: 14px;
    opacity: 1;
    transform: translateY(0);
    transition: all 0.3s ease;
}

.hmbdc-toast.ok {
    border-color: #cfe9d5;
}

.hmbdc-toast.warn {
    border-color: #f0d2cd;
}

.hmbdc-toast .t-title {
    font-weight: 700;
    margin-bottom: 4px;
}

/* Responsive Design */
@media (max-width: 960px) { 
    .hmbdc-form {
        grid-template-columns: 1fr; 
    }
    
    .delivery-options-grid {
        grid-template-columns: 1fr;
    }
    
    .hmbdc-free-banner {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
    
    .hmbdc-head {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .hmbdc-badge {
        align-self: stretch;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .hmbdc-card {
        padding: 16px;
        border-radius: 16px;
    }
    
    .hmbdc-free-banner {
        padding: 12px;
        border-radius: 12px;
    }
    
    .free-banner-title {
        font-size: 16px;
    }
    
    .hmbdc-title {
        font-size: 18px;
    }
    
    .order-online-btn {
        padding: 14px 24px;
        font-size: 16px;
    }
}
