/**
 * Dokan Türk Kargo Entegrasyonu - Frontend CSS
 * 
 * Satıcı paneli ve sipariş sayfaları için stil tanımlamaları
 */

/* Satıcı Panel Kargo Sayfası */
.dokan-turkish-shipping-dashboard {
    margin-bottom: 30px;
}

.dokan-turkish-shipping-dashboard .section-title {
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    margin-bottom: 20px;
    font-size: 18px;
    color: #333;
}

.dokan-turkish-shipping-dashboard .shipment-filters {
    margin-bottom: 20px;
    padding: 15px;
    background: #f5f5f5;
    border-radius: 4px;
}

.dokan-turkish-shipping-dashboard .filter-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 15px;
}

.dokan-turkish-shipping-dashboard .filter-item {
    min-width: 200px;
}

.dokan-turkish-shipping-dashboard .filter-label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.dokan-turkish-shipping-dashboard select,
.dokan-turkish-shipping-dashboard input[type="text"] {
    width: 100%;
}

.dokan-turkish-shipping-dashboard .filter-buttons {
    margin-top: 10px;
}

/* Kargo Tablosu */
.dokan-turkish-shipping-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.dokan-turkish-shipping-table th,
.dokan-turkish-shipping-table td {
    padding: 10px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.dokan-turkish-shipping-table th {
    background-color: #f5f5f5;
    font-weight: bold;
}

.dokan-turkish-shipping-table tr:hover {
    background-color: #f9f9f9;
}

.dokan-turkish-shipping-table .status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
    text-transform: uppercase;
}

.dokan-turkish-shipping-table .status-created {
    background-color: #dff0d8;
    color: #3c763d;
}

.dokan-turkish-shipping-table .status-pending {
    background-color: #fcf8e3;
    color: #8a6d3b;
}

.dokan-turkish-shipping-table .status-transit {
    background-color: #d9edf7;
    color: #31708f;
}

.dokan-turkish-shipping-table .status-delivered {
    background-color: #d9edf7;
    color: #3c763d;
}

.dokan-turkish-shipping-table .status-returned {
    background-color: #f2dede;
    color: #a94442;
}

.dokan-turkish-shipping-table .status-error {
    background-color: #f2dede;
    color: #a94442;
}

.dokan-turkish-shipping-table .actions {
    display: flex;
    gap: 5px;
}

.dokan-turkish-shipping-table .action-button {
    padding: 5px 10px;
    border-radius: 3px;
    background: #f0f0f0;
    color: #333;
    text-decoration: none;
    font-size: 12px;
}

.dokan-turkish-shipping-table .action-button:hover {
    background: #e0e0e0;
}

.dokan-turkish-shipping-table .action-button.track {
    background: #5bc0de;
    color: #fff;
}

.dokan-turkish-shipping-table .action-button.track:hover {
    background: #46b8da;
}

.dokan-turkish-shipping-table .action-button.print {
    background: #5cb85c;
    color: #fff;
}

.dokan-turkish-shipping-table .action-button.print:hover {
    background: #4cae4c;
}

/* Kargo Oluşturma Paneli */
.dokan-turkish-shipping-panel {
    margin-top: 20px;
    margin-bottom: 20px;
}

.dokan-turkish-shipping-panel .dokan-panel-heading {
    background-color: #f5f5f5;
    padding: 10px 15px;
    border: 1px solid #e3e3e3;
    border-radius: 4px 4px 0 0;
}

.dokan-turkish-shipping-panel .dokan-panel-body {
    padding: 15px;
    border: 1px solid #e3e3e3;
    border-top: 0;
    border-radius: 0 0 4px 4px;
}

.dokan-turkish-shipping-create-form .dokan-form-group {
    margin-bottom: 15px;
}

.dokan-turkish-shipping-create-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.dokan-turkish-shipping-create-form select,
.dokan-turkish-shipping-create-form input[type="text"] {
    width: 100%;
    max-width: 400px;
}

/* Sonuç Mesajı */
#shipment-result {
    margin-top: 15px;
}

#shipment-result .dokan-alert-success {
    padding: 15px;
    border-radius: 4px;
    background-color: #dff0d8;
    border: 1px solid #d6e9c6;
    color: #3c763d;
}

#shipment-result p {
    margin: 5px 0;
}

/* Satıcı Ayarları Sayfası */
.dokan-turkish-shipping-settings-form .dokan-form-group {
    margin-bottom: 20px;
}

.dokan-turkish-shipping-settings-form .help-block {
    color: #737373;
    font-size: 12px;
    margin-top: 5px;
}

.dokan-turkish-shipping-settings-form .dokan-control-label {
    font-weight: bold;
}

#custom-address-fields {
    padding-top: 15px;
    border-top: 1px solid #eee;
    margin-top: 15px;
}

/* Sipariş Kargo Bilgileri */
.order-shipment-tracking {
    margin-top: 20px;
    padding: 15px;
    background: #f8f8f8;
    border: 1px solid #e3e3e3;
    border-radius: 4px;
}

.order-shipment-tracking h4 {
    margin-top: 0;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.order-shipment-tracking .shipment-item {
    margin-bottom: 20px;
}

.order-shipment-tracking .shipment-detail {
    margin-bottom: 10px;
}

.order-shipment-tracking .shipment-label {
    font-weight: bold;
    display: inline-block;
    min-width: 150px;
}

.order-shipment-tracking .tracking-btn {
    display: inline-block;
    margin-right: 10px;
    text-decoration: none;
}

.order-shipment-tracking .shipment-actions {
    margin-top: 15px;
    margin-bottom: 15px;
}

.order-shipment-tracking .shipment-status-result {
    margin-top: 15px;
    padding: 10px;
    background: #f0f0f0;
    border-radius: 4px;
}

/* Loading spinner */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-left: 5px;
    border: 2px solid rgba(0, 0, 0, 0.1);
    border-top-color: #333;
    border-radius: 50%;
    animation: dokan-turkish-shipping-spin 0.8s linear infinite;
}

@keyframes dokan-turkish-shipping-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Shipment details */
.shipment-details {
    background-color: #f9f9f9;
}

.shipment-detail-content {
    padding: 15px;
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.shipment-detail-content .shipment-item {
    flex: 1;
    min-width: 250px;
}

.shipment-detail-content h4 {
    margin-top: 0;
    margin-bottom: 15px;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

.shipment-status-info {
    padding: 10px;
    background-color: #f0f0f0;
    border-radius: 4px;
    margin-top: 10px;
}

/* Bulk actions */
.bulk-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.bulk-actions select {
    min-width: 200px;
}

/* Responsive Styles */
@media (max-width: 767px) {
    .dokan-turkish-shipping-dashboard .filter-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .dokan-turkish-shipping-dashboard .filter-item {
        min-width: 100%;
    }
    
    .dokan-turkish-shipping-table, 
    .dokan-turkish-shipping-table thead, 
    .dokan-turkish-shipping-table tbody, 
    .dokan-turkish-shipping-table th, 
    .dokan-turkish-shipping-table td, 
    .dokan-turkish-shipping-table tr {
        display: block;
    }
    
    .dokan-turkish-shipping-table thead tr {
        position: absolute;
        top: -9999px;
        left: -9999px;
    }
    
    .dokan-turkish-shipping-table tr {
        border: 1px solid #eee;
        margin-bottom: 15px;
    }
    
    .dokan-turkish-shipping-table td {
        border: none;
        border-bottom: 1px solid #eee;
        position: relative;
        padding-left: 50%;
    }
    
    .dokan-turkish-shipping-table td:before {
        position: absolute;
        top: 10px;
        left: 15px;
        width: 45%;
        padding-right: 10px;
        white-space: nowrap;
        font-weight: bold;
    }
    
    .shipment-detail-content {
        flex-direction: column;
    }
}