/* WordPress Türkiye Adres Formu CSS */

.address-form-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.address-form .form-row {
    display: flex;
    flex-wrap: wrap;
    margin: -10px;
    margin-bottom: 20px;
}

.address-form .form-group {
    flex: 1;
    min-width: 250px;
    padding: 10px;
    position: relative;
}

.address-form .form-group.full-width {
    flex: 100%;
}

.address-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.address-form .form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
    background-color: #fff;
    box-sizing: border-box;
}

.address-form .form-control:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.address-form .form-control:disabled {
    background-color: #f5f5f5;
    color: #999;
    cursor: not-allowed;
}

.address-form .form-control.error {
    border-color: #dc3232;
    box-shadow: 0 0 0 3px rgba(220, 50, 50, 0.1);
}

.address-form select.form-control {
    height: 45px;
    cursor: pointer;
    appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 4 5"><path fill="%23666" d="M2 0L0 2h4zm0 5L0 3h4z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
    padding-right: 35px;
}

.address-form textarea.form-control {
    resize: vertical;
    min-height: 80px;
    font-family: inherit;
}

.address-form .form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.address-form .btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    min-width: 120px;
}

.address-form .btn-primary {
    background-color: #007cba;
    color: white;
}

.address-form .btn-primary:hover {
    background-color: #005a87;
    transform: translateY(-1px);
}

.address-form .btn-secondary {
    background-color: #6c757d;
    color: white;
}

.address-form .btn-secondary:hover {
    background-color: #545b62;
    transform: translateY(-1px);
}

.address-form .btn:active {
    transform: translateY(0);
}

/* Loading durumu */
.address-form .form-control.loading {
    background-image: url('data:image/svg+xml;charset=US-ASCII,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 50 50"><circle cx="25" cy="25" r="20" fill="none" stroke="%23007cba" stroke-width="3" stroke-dasharray="31.416" stroke-dashoffset="31.416"><animate attributeName="stroke-dasharray" dur="2s" values="0 31.416;15.708 15.708;0 31.416" repeatCount="indefinite"/><animate attributeName="stroke-dashoffset" dur="2s" values="0;-15.708;-31.416" repeatCount="indefinite"/></circle></svg>');
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
}

/* Hata ve başarı mesajları */
.address-form-error,
.address-form-success {
    padding: 12px 15px;
    margin-bottom: 20px;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.4;
}

.address-form-error {
    background-color: #ffeaea;
    border: 1px solid #dc3232;
    color: #dc3232;
}

.address-form-success {
    background-color: #eafaf1;
    border: 1px solid #46b450;
    color: #46b450;
}

/* Adres önizlemesi */
.address-preview {
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
}

.address-preview strong {
    color: #495057;
}

.address-preview .preview-text {
    display: block;
    margin-top: 5px;
    color: #6c757d;
    font-style: italic;
}

/* Responsive tasarım */
@media (max-width: 768px) {
    .address-form-container {
        padding: 15px;
        margin: 10px;
    }
    
    .address-form .form-row {
        flex-direction: column;
    }
    
    .address-form .form-group {
        min-width: auto;
        margin-bottom: 0;
    }
    
    .address-form .form-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .address-form .btn {
        margin-bottom: 10px;
        min-width: auto;
    }
}

@media (max-width: 480px) {
    .address-form-container {
        padding: 10px;
        margin: 5px;
    }
    
    .address-form .form-control {
        padding: 10px 12px;
        font-size: 16px; /* iOS zoom'u engellemek için */
    }
}

/* Özel select arrow için modern tarayıcılar */
@supports (-webkit-appearance: none) or (-moz-appearance: none) or (appearance: none) {
    .address-form select.form-control {
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
    }
}

/* Focus görünürlüğü için yüksek kontrast */
@media (prefers-contrast: high) {
    .address-form .form-control:focus {
        border-color: #000;
        box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.3);
    }
}

/* Reduced motion desteği */
@media (prefers-reduced-motion: reduce) {
    .address-form .form-control,
    .address-form .btn {
        transition: none;
    }
    
    .address-form .btn:hover {
        transform: none;
    }
}

/* Dark mode desteği */
@media (prefers-color-scheme: dark) {
    .address-form-container {
        background: #2c2c2c;
        color: #fff;
    }
    
    .address-form .form-control {
        background-color: #3c3c3c;
        border-color: #555;
        color: #fff;
    }
    
    .address-form .form-control:disabled {
        background-color: #2a2a2a;
        color: #888;
    }
    
    .address-form .form-control:focus {
        border-color: #4a9eff;
    }
    
    .address-form label {
        color: #fff;
    }
    
    .address-preview {
        background-color: #3c3c3c;
        border-color: #555;
    }
}
