/* ============================================
   Restaurant Delivery Zone - Widget Styles
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600&display=swap');

/* ---- Widget Container ---- */
.rdz-widget {
    font-family: 'DM Sans', sans-serif;
    background: #ffffff;
    border: 1.5px solid #e8e8e8;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    margin-bottom: 24px;
    transition: box-shadow 0.2s ease;
}

.rdz-widget:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.10);
}

/* ---- Header ---- */
.rdz-widget-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 18px;
    background: #1a1a1a;
    color: #ffffff;
}

.rdz-icon {
    display: flex;
    align-items: center;
    color: #f97316;
}

.rdz-title {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

/* ---- Body ---- */
.rdz-widget-body {
    padding: 16px 18px;
}

/* ---- Zone Selected State ---- */
.rdz-zone-selected {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    background: #f0fdf4;
    border: 1.5px solid #bbf7d0;
    border-radius: 10px;
    padding: 12px 14px;
    margin-bottom: 10px;
}

.rdz-zone-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.rdz-zone-label {
    font-size: 11px;
    font-weight: 500;
    color: #16a34a;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.rdz-zone-name {
    font-size: 14px;
    font-weight: 600;
    color: #14532d;
}

/* ---- Buttons ---- */
.rdz-btn-change {
    font-family: 'DM Sans', sans-serif;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    background: #ffffff;
    border: 1.5px solid #d1d5db;
    border-radius: 7px;
    padding: 6px 12px;
    cursor: pointer;
    transition: all 0.18s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.rdz-btn-change:hover {
    background: #f9fafb;
    color: #374151;
    border-color: #9ca3af;
}

.rdz-btn-confirm {
    font-family: 'DM Sans', sans-serif;
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    color: #ffffff;
    background: #1a1a1a;
    border: none;
    border-radius: 9px;
    padding: 11px 16px;
    cursor: pointer;
    margin-top: 10px;
    transition: all 0.18s ease;
}

.rdz-btn-confirm:hover {
    background: #f97316;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(249,115,22,0.30);
}

.rdz-btn-confirm.rdz-loading {
    opacity: 0.75;
    cursor: not-allowed;
}

.rdz-btn-cancel {
    font-family: 'DM Sans', sans-serif;
    width: 100%;
    font-size: 12px;
    font-weight: 500;
    color: #9ca3af;
    background: transparent;
    border: none;
    padding: 7px;
    cursor: pointer;
    margin-top: 4px;
    border-radius: 7px;
    transition: color 0.15s ease;
}

.rdz-btn-cancel:hover {
    color: #6b7280;
    background: #f3f4f6;
}

/* ---- No Zone State ---- */
.rdz-no-zone .rdz-prompt {
    font-size: 13px;
    color: #6b7280;
    margin: 0 0 12px 0;
    line-height: 1.5;
}

/* ---- Zone Selector ---- */
.rdz-zone-selector {
    margin-top: 6px;
}

.rdz-select-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 6px;
}

.rdz-select-wrapper {
    position: relative;
}

#rdz-zone-select {
    font-family: 'DM Sans', sans-serif;
    width: 100%;
    font-size: 13px;
    font-weight: 500;
    color: #1f2937;
    background: #f9fafb;
    border: 1.5px solid #e5e7eb;
    border-radius: 9px;
    padding: 10px 36px 10px 12px;
    appearance: none;
    -webkit-appearance: none;
    cursor: pointer;
    transition: border-color 0.15s ease;
    outline: none;
}

#rdz-zone-select:focus {
    border-color: #1a1a1a;
    background: #ffffff;
}

.rdz-select-arrow {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    pointer-events: none;
    display: flex;
}

/* ---- User Note ---- */
.rdz-user-note {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: #9ca3af;
    margin-top: 8px;
}

/* ---- Error ---- */
.rdz-error-msg {
    font-size: 12px;
    color: #dc2626;
    margin-top: 8px;
    padding: 8px 10px;
    background: #fef2f2;
    border-radius: 7px;
    border: 1px solid #fecaca;
}

/* ---- Restriction Notice (inside widget) ---- */
.rdz-restriction-notice {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 12px;
    color: #92400e;
    background: #fffbeb;
    border: 1.5px solid #fde68a;
    border-radius: 9px;
    padding: 10px 12px;
    margin-top: 10px;
    line-height: 1.5;
}

/* ---- Shop Notice (before product grid) ---- */
.rdz-shop-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 10px;
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 20px;
}

.rdz-notice-warning {
    background: #fffbeb;
    border: 1.5px solid #fcd34d;
    color: #92400e;
}

/* ---- Add to Cart Disabled ---- */
body.rdz-no-zone .add_to_cart_button,
body.rdz-no-zone .single_add_to_cart_button,
.add_to_cart_button.rdz-disabled,
.single_add_to_cart_button.rdz-disabled {
    opacity: 0.45 !important;
    cursor: not-allowed !important;
    pointer-events: none !important;
    background-color: #9ca3af !important;
    border-color: #9ca3af !important;
    color: #ffffff !important;
    box-shadow: none !important;
}

/* ---- Spinner ---- */
.rdz-spinner {
    display: inline-block;
    width: 13px;
    height: 13px;
    border: 2px solid rgba(255,255,255,0.4);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: rdz-spin 0.65s linear infinite;
}

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

/* ---- Toast ---- */
.rdz-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    font-family: 'DM Sans', sans-serif;
    font-size: 13px;
    font-weight: 600;
    padding: 11px 22px;
    border-radius: 100px;
    z-index: 99999;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    white-space: nowrap;
    box-shadow: 0 8px 30px rgba(0,0,0,0.18);
}

.rdz-toast-success {
    background: #1a1a1a;
    color: #ffffff;
}

.rdz-toast-warning {
    background: #f97316;
    color: #ffffff;
}

.rdz-toast-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ---- Animations ---- */
.rdz-fade-in {
    animation: rdz-fadeIn 0.3s ease forwards;
}

@keyframes rdz-fadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.rdz-slide-in {
    animation: rdz-slideIn 0.25s ease forwards;
}

@keyframes rdz-slideIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.rdz-pulse {
    animation: rdz-pulse 0.5s ease 2;
}

@keyframes rdz-pulse {
    0%, 100% { box-shadow: 0 2px 12px rgba(0,0,0,0.06); }
    50% { box-shadow: 0 0 0 4px rgba(249,115,22,0.35); }
}

/* ---- Utility ---- */
.rdz-hidden {
    display: none !important;
}
