/* Zipcode Modal Styles */
.zipcode-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.zipcode-overlay.active {
    display: flex;
    opacity: 1;
}

.zipcode-modal {
    background: white;
    border-radius: 20px;
    max-width: 480px;
    width: 90%;
    padding: 40px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.zipcode-overlay.active .zipcode-modal {
    transform: translateY(0);
    opacity: 1;
}

.zipcode-modal-content {
    text-align: center;
}

/* Step transitions */
.modal-step {
    display: none;
}

.modal-step.active {
    display: block;
    animation: stepFadeIn 0.3s ease;
}

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

.zipcode-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    color: white;
}

.zipcode-title {
    font-size: 24px;
    font-weight: 800;
    color: #1F2937;
    margin: 0 0 8px;
}

.zipcode-subtitle {
    font-size: 15px;
    color: #6B7280;
    margin: 0 0 28px;
    line-height: 1.5;
}

/* Country Selector */
.country-selector {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-bottom: 8px;
}

.country-card {
    flex: 1;
    max-width: 180px;
    padding: 24px 16px;
    background: #F9FAFB;
    border: 3px solid #E5E7EB;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.country-card:hover {
    border-color: #F59E0B;
    background: #FFFBEB;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(245, 158, 11, 0.15);
}

.country-card.selected {
    border-color: #F59E0B;
    background: #FFFBEB;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.15);
}

.country-card.preselected {
    border-color: #93C5FD;
    background: #EFF6FF;
}

.country-flag {
    width: 56px;
    height: 38px;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.country-flag svg {
    width: 100%;
    height: 100%;
}

.country-name {
    font-size: 16px;
    font-weight: 700;
    color: #1F2937;
}

/* Back button */
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: transparent;
    border: none;
    color: #6B7280;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 16px;
    transition: color 0.2s ease;
}

.back-btn:hover {
    color: #F59E0B;
}

/* Selected country badge */
.selected-country-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 20px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}

/* Postcode input */
.zipcode-input-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 8px;
}

.zipcode-input {
    width: 140px;
    padding: 16px 20px;
    font-size: 28px;
    font-weight: 700;
    text-align: center;
    border: 3px solid #E5E7EB;
    border-radius: 12px;
    letter-spacing: 4px;
    transition: all 0.2s ease;
}

.zipcode-input:focus {
    outline: none;
    border-color: #F59E0B;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.15);
}

.zipcode-input::placeholder {
    color: #D1D5DB;
    letter-spacing: 4px;
}

.zipcode-suffix {
    font-size: 20px;
    font-weight: 600;
    color: #9CA3AF;
    transition: opacity 0.2s ease;
}

.zipcode-suffix.hidden {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.zipcode-hint {
    font-size: 13px;
    color: #9CA3AF;
    margin: 0 0 24px;
}

.zipcode-submit-btn {
    width: 100%;
    padding: 16px 24px;
    background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.zipcode-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(245, 158, 11, 0.3);
}

.zipcode-submit-btn:active {
    transform: translateY(0);
}

.zipcode-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.zipcode-skip-btn {
    margin-top: 16px;
    padding: 12px 24px;
    background: transparent;
    color: #6B7280;
    border: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: color 0.2s ease;
}

.zipcode-skip-btn:hover {
    color: #1F2937;
}

/* Postcode indicator in header/shop */
.postcode-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    color: #92400E;
    cursor: pointer;
    transition: all 0.2s ease;
}

.postcode-indicator:hover {
    background: rgba(245, 158, 11, 0.2);
    border-color: rgba(245, 158, 11, 0.5);
}

.postcode-indicator svg {
    width: 14px;
    height: 14px;
}

.postcode-indicator .change-text {
    font-size: 11px;
    color: #B45309;
    font-weight: 500;
}

/* Error state */
.zipcode-input.error {
    border-color: #EF4444;
    animation: shake 0.4s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

.zipcode-error-message {
    color: #EF4444;
    font-size: 13px;
    margin-top: 8px;
    display: none;
}

.zipcode-error-message.visible {
    display: block;
}

/* Mobile responsive */
@media (max-width: 480px) {
    .zipcode-modal {
        padding: 32px 24px;
        margin: 16px;
    }

    .zipcode-title {
        font-size: 20px;
    }

    .zipcode-input {
        width: 120px;
        padding: 14px 16px;
        font-size: 24px;
    }

    .country-selector {
        gap: 12px;
    }

    .country-card {
        padding: 20px 12px;
    }

    .country-name {
        font-size: 14px;
    }
}
