/* YD Delivery Zones – Frontend Modal */

.yd-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.yd-modal__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(3px);
    animation: ydFadeIn .2s ease;
}

.yd-modal__window {
    position: relative;
    z-index: 1;
    background: #fff;
    border-radius: 16px;
    padding: 40px 36px;
    width: 90%;
    max-width: 480px;
    box-shadow: 0 20px 60px rgba(0,0,0,.2);
    animation: ydSlideUp .25s ease;
    text-align: center;
}

@keyframes ydFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes ydSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.yd-modal__close {
    position: absolute;
    top: 14px;
    right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    line-height: 1;
    color: #999;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: color .15s, background .15s;
}

.yd-modal__close:hover {
    color: #333;
    background: #f0f0f0;
}

.yd-modal__title {
    font-size: 20px;
    font-weight: 700;
    margin: 0 0 10px;
    color: #1a1a1a;
    line-height: 1.3;
}

.yd-modal__subtitle {
    font-size: 14px;
    color: #666;
    margin: 0 0 24px;
    line-height: 1.6;
}

/* Address input */
.yd-address-input-wrap {
    position: relative;
    margin-bottom: 16px;
    text-align: left;
}

.yd-input {
    width: 100%;
    box-sizing: border-box;
    padding: 12px 16px;
    font-size: 15px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    outline: none;
    transition: border-color .2s;
    font-family: inherit;
}

.yd-input:focus {
    border-color: #005bff;
}

.yd-suggestions {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,.12);
    list-style: none;
    margin: 0;
    padding: 6px 0;
    z-index: 10;
    max-height: 220px;
    overflow-y: auto;
}

.yd-suggestions li {
    padding: 10px 16px;
    font-size: 14px;
    cursor: pointer;
    color: #1a1a1a;
    text-align: left;
    transition: background .12s;
}

.yd-suggestions li:hover,
.yd-suggestions li.is-active {
    background: #f0f4ff;
}

/* Buttons */
.yd-btn {
    display: block;
    width: 100%;
    padding: 13px 20px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: opacity .2s, transform .1s;
    margin-bottom: 10px;
    font-family: inherit;
}

.yd-btn:last-child {
    margin-bottom: 0;
}

.yd-btn:active {
    transform: scale(.98);
}

.yd-btn--primary {
    background: #005bff;
    color: #fff;
}

.yd-btn--primary:hover {
    opacity: .9;
}

.yd-btn--secondary {
    background: #f2f2f2;
    color: #333;
}

.yd-btn--secondary:hover {
    background: #e8e8e8;
}

.yd-btn--pickup {
    background: #ff6d00;
    color: #fff;
}

.yd-btn--pickup:hover {
    opacity: .9;
}

/* Icons */
.yd-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin: 0 auto 20px;
    font-weight: 700;
}

.yd-icon--success {
    background: #e6f9f0;
    color: #00a854;
}

.yd-icon--error {
    background: #fff0f0;
    color: #e53935;
}

.yd-btn--ghost {
    background: transparent;
    color: #999;
    font-weight: 400;
    font-size: 13px;
    padding: 8px 20px;
}

.yd-btn--ghost:hover {
    color: #333;
    background: #f5f5f5;
}

/* Spinner */
.yd-step#yd-step-loading {
    padding: 20px 0;
}

.yd-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #e0e0e0;
    border-top-color: #005bff;
    border-radius: 50%;
    animation: ydSpin .7s linear infinite;
    margin: 0 auto 16px;
}

@keyframes ydSpin {
    to { transform: rotate(360deg); }
}

.yd-step#yd-step-loading p {
    color: #666;
    font-size: 14px;
    margin: 0;
}
