/* Header Delivery Widget Stilleri */
#ddt-header-widget {
    background-color: #f8f9fa;
    border-bottom: 1px solid #e5e5e5;
    padding: 10px 0;
    width: 100%;
    display: block !important;
    position: relative;
    z-index: 100;
    font-family: Arial, Helvetica, sans-serif;
}

.ddt-widget-inner {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 15px;
    flex-wrap: nowrap;
}

.ddt-widget-title {
    font-size: 14px;
    font-weight: 600;
    color: #222;
    white-space: nowrap;
    font-family: Arial, Helvetica, sans-serif;
}

.ddt-field {
    flex: 0 0 auto;
}

.ddt-select,
.ddt-input,
.ddt-search-input {
    padding: 6px 12px;
    border: 1px solid #d0d0d0;
    border-radius: 4px;
    font-size: 13px;
    min-width: 150px;
    max-width: 180px;
    background-color: #fff;
    transition: all 0.3s ease;
    font-family: Arial, Helvetica, sans-serif;
    color: #333;
    height: 36px;
    line-height: 24px;
    box-sizing: border-box;
}

.ddt-select:hover,
.ddt-input:hover,
.ddt-search-input:hover {
    border-color: #999;
}

.ddt-select:focus,
.ddt-input:focus,
.ddt-search-input:focus {
    outline: none;
    border-color: #333;
    box-shadow: 0 0 0 2px rgba(0,0,0,0.05);
}

.ddt-select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 28px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
}

.ddt-search-input {
    cursor: text;
    width: 100%;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='13' height='13' viewBox='0 0 24 24'%3E%3Cpath fill='%23888' d='M15.5 14h-.79l-.28-.27C15.41 12.59 16 11.11 16 9.5 16 5.91 13.09 3 9.5 3S3 5.91 3 9.5 5.91 16 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 28px;
}

.ddt-input {
    cursor: pointer;
    background-color: #fafafa;
}

.ddt-button {
    padding: 6px 20px;
    background-color: #333;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    height: 36px;
    line-height: 24px;
    white-space: nowrap;
    font-family: Arial, Helvetica, sans-serif;
}

.ddt-button:hover {
    background-color: #000;
}

.ddt-button:active {
    transform: scale(0.98);
}

.ddt-min-amount-message {
    text-align: center;
    padding: 6px 14px;
    background-color: #e7f5ff;
    color: #004a99;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    border: 1px solid #99d6ff;
    white-space: nowrap;
    height: 36px;
    display: flex;
    align-items: center;
    font-family: Arial, Helvetica, sans-serif;
}

/* Responsive */
@media (max-width: 1200px) {
    .ddt-widget-inner {
        gap: 10px;
    }

    .ddt-select,
    .ddt-input,
    .ddt-searchable-wrapper,
    .ddt-search-input {
        min-width: 130px;
        max-width: 160px;
    }

    .ddt-widget-title {
        font-size: 13px;
    }
}

@media (max-width: 992px) {
    #ddt-header-widget {
        padding: 15px 0;
    }

    .ddt-widget-container {
        padding: 0 20px;
    }

    .ddt-widget-inner {
        flex-wrap: wrap;
        gap: 10px;
    }

    .ddt-widget-title {
        width: 100%;
        margin-bottom: 5px;
    }

    .ddt-select,
    .ddt-input,
    .ddt-search-input,
    .ddt-searchable-wrapper,
    .ddt-button {
        flex: 1 1 auto;
        min-width: auto;
        max-width: none;
    }

    .ddt-min-amount-message {
        width: 100%;
        margin-top: 5px;
    }
}

@media (max-width: 768px) {
    .ddt-widget-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .ddt-select,
    .ddt-input,
    .ddt-search-input,
    .ddt-searchable-wrapper,
    .ddt-button {
        width: 100%;
    }
}

/* Datepicker kapalı günler */
.ddt-disabled-date {
    background-color: #f0f0f0 !important;
    color: #999 !important;
    cursor: not-allowed !important;
}

/* Loading durumu */
.ddt-button.loading {
    opacity: 0.6;
    pointer-events: none;
}

.ddt-button.loading::after {
    content: '...';
    animation: dots 1.5s infinite;
}

@keyframes dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* jQuery UI Datepicker z-index düzeltmesi */
.ui-datepicker {
    z-index: 99999 !important;
}

/* Datepicker overlay için */
.ui-widget-overlay {
    z-index: 99998 !important;
}

/* Datepicker navigasyon ikonları - her zaman görünür */
.ui-datepicker .ui-datepicker-prev,
.ui-datepicker .ui-datepicker-next {
    cursor: pointer;
    opacity: 1 !important;
    top: 3px;
    width: 26px;
    height: 26px;
    border-radius: 3px;
}

.ui-datepicker .ui-datepicker-prev:hover,
.ui-datepicker .ui-datepicker-next:hover {
    background: rgba(255,255,255,0.25) !important;
    border: 1px solid rgba(255,255,255,0.4) !important;
    opacity: 1 !important;
}

.ui-datepicker .ui-datepicker-prev .ui-icon,
.ui-datepicker .ui-datepicker-next .ui-icon {
    background-image: none !important;
    text-indent: 0 !important;
    overflow: visible !important;
    width: 26px !important;
    height: 26px !important;
    top: 0 !important;
    left: 0 !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    position: relative;
    font-size: 0 !important;
    color: transparent !important;
}

.ui-datepicker .ui-datepicker-prev .ui-icon::after {
    content: '◄';
    color: #fff;
    font-size: 11px;
    line-height: 1;
    display: block;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

.ui-datepicker .ui-datepicker-next .ui-icon::after {
    content: '►';
    color: #fff;
    font-size: 11px;
    line-height: 1;
    display: block;
    text-shadow: 0 1px 3px rgba(0,0,0,0.5);
}

/* Searchable PLZ Dropdown */
.ddt-plz-hidden {
    display: none !important;
}

.ddt-searchable-wrapper {
    position: relative;
    display: inline-block;
    min-width: 150px;
    max-width: 180px;
    flex: 0 0 auto;
}

/* Cart / Checkout formunda PLZ kutusu diğer alanlarla eşit genişlikte */
#ddt-cart-delivery-form .ddt-searchable-wrapper,
#ddt-checkout-delivery-form .ddt-searchable-wrapper {
    display: block;
    width: 100%;
    min-width: 0;
    max-width: none;
    flex: none;
}

#ddt-cart-delivery-form .ddt-search-input,
#ddt-checkout-delivery-form .ddt-search-input {
    width: 100%;
    min-width: 0;
    max-width: none;
}

.ddt-search-list {
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    max-height: 220px;
    overflow-y: auto;
    z-index: 999999;
    list-style: none;
    margin: 0;
    padding: 0;
    box-shadow: 0 6px 20px rgba(0,0,0,0.13);
}

.ddt-search-list li {
    padding: 8px 12px;
    cursor: pointer;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
    color: #333;
    border-bottom: 1px solid #f2f2f2;
    transition: background 0.12s;
}

.ddt-search-list li:last-child {
    border-bottom: none;
}

.ddt-search-list li:hover {
    background: #f0f0f0;
    color: #000;
}

.ddt-search-list li.ddt-option-selected {
    background: #ebebeb;
    font-weight: 700;
}
