/* =========================================================
   saleWaybill.css - GlassCad Clean & Modern Style
   Compatible with WholesalePurchase.cshtml
   ========================================================= */

[v-cloak] {
    display: none !important;
}

p {
    margin-top: 0rem !important;
    margin-bottom: 0rem !important;
}

/* --- Yumuşak İkon Tasarımı (Soft Icons) --- */
.soft-icon {
    opacity: 0.85;
    filter: saturate(0.8);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
    display: inline-block;
}

.soft-icon:hover {
    opacity: 1;
    filter: saturate(1);
    transform: scale(1.15) translateY(-2px);
}

.flipped-icon {
    transform: scaleX(-1);
}

.flipped-icon.soft-icon:hover {
    transform: scaleX(-1) scale(1.15) translateY(-2px);
}

/* --- Ana Tablo Sarmalayıcı (Clean Wrapper) --- */
.glasscad-clean-wrapper {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
    overflow: visible;
    min-height: 200px;
}

.table-responsive-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    min-height: 250px;
}

/* --- Ana Temiz Tablo (Clean Table) --- */
.glasscad-clean-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-width: 900px;
}

.glasscad-clean-table thead {
    background-color: #fafafa;
    border-bottom: 1px solid #cbd5e1;
}

.glasscad-clean-table th {
    padding: 10px 12px;
    font-size: 11.5px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: none;
    vertical-align: middle;
    text-align: center;
    white-space: nowrap;
    transition: background-color 0.2s;
}

.glasscad-clean-table th.sortable-header {
    cursor: pointer;
    user-select: none;
}

.glasscad-clean-table th.sortable-header:hover {
    background-color: #f1f5f9;
    color: #305b9f;
}

.glasscad-clean-table tbody td {
    padding: 9px 12px !important;
    font-size: 13px;
    color: #334155;
    border-bottom: 1px solid #f1f5f9;
    border-top: none;
    border-left: none;
    border-right: none;
    vertical-align: middle;
    text-align: center;
    transition: background-color 0.15s ease;
}

.glasscad-clean-table tbody td.bold-data {
    font-weight: 600;
    color: #0f172a;
}

.glasscad-clean-table tbody tr:hover td {
    background-color: #f8fafc !important;
}

.glasscad-clean-table tbody tr.row-selected td,
.glasscad-clean-table tbody tr.row-clicked td {
    background-color: #d8e2ed !important;
    color: #0f172a !important;
    border-bottom: 1px solid #cbd5e1 !important;
    border-top: none;
    position: relative;
    z-index: 10;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.03);
}

.glasscad-clean-table tbody tr.row-selected td:first-child,
.glasscad-clean-table tbody tr.row-clicked td:first-child {
    box-shadow: inset 5px 0 0 0 #2C5D9F !important;
}

.glasscad-clean-table tbody tr.row-canceled td {
    background-color: #fff1f2 !important;
    color: #ef4444 !important;
    font-style: italic;
}

.glasscad-clean-table tbody tr.row-deleted td {
    background-color: #f8fafc !important;
    color: #94a3b8 !important;
    text-decoration: line-through;
    pointer-events: none;
}

/* --- İrsaliye Alt Detay Tablosu (Detail Table) --- */
.glasscad-detail-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
}

.glasscad-detail-table th {
    background: #f8fafc;
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
    padding: 10px 16px;
    border-bottom: 1px solid #e2e8f0;
    text-align: center;
}

.glasscad-detail-table td {
    padding: 10px 16px;
    font-size: 13px;
    color: #475569;
    border-bottom: 1px solid #f1f5f9;
    text-align: center;
}

/* --- Üst Toolbar (Top Action Bar) --- */
.top-action-bar-wrapper {
    padding: 0.8rem 1.2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
    min-height: 55px;
    background-color: #305b9f;
    border-radius: 8px 8px 0 0;
    color: whitesmoke;
    align-items: center;
    justify-content: space-between;
}

/* --- Filtre Kutusu (Filter Box) --- */
.filter-box {
    position: absolute;
    right: 10px;
    width: 32rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
    z-index: 999;
}

.filter-box h4 {
    margin: 0 0 12px;
    font-size: 14px;
    color: #0f172a;
    font-weight: 700;
    text-transform: uppercase;
}

.filter-box label {
    display: flex;
    align-items: center;
    font-size: 13.5px;
    color: #475569;
    margin-bottom: 10px;
    cursor: pointer;
}

.filter-box input[type="radio"], 
.filter-box input[type="checkbox"] {
    margin-right: 8px;
    accent-color: #305b9f;
    cursor: pointer;
}

.filter-box input[type="date"] {
    padding: 6px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    width: 100%;
    margin-top: 4px;
    color: #334155;
}

.filter-box button {
    background-color: #305b9f;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    width: 100%;
    cursor: pointer;
    margin-top: 10px;
    transition: background-color 0.2s;
}

.filter-box button:hover {
    background-color: #1e3a8a;
}

/* --- Dişli (Gear) Açılır Menüleri --- */
.gear-dropdown {
    position: relative;
    display: inline-block;
    padding: 2px;
}

.gear-trigger {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 6px;
    border-radius: 6px;
    transition: background-color 0.2s;
}

.gear-trigger:hover {
    background-color: #f1f5f9;
}

.gear-caret {
    font-size: 11px;
    color: #94a3b8;
}

.gear-dropdown-content {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    right: 50%;
    transform: translateX(50%);
    top: 100%;
    background-color: #ffffff;
    min-width: 140px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    z-index: 1000;
    padding: 4px 0;
    transition: all 0.2s ease;
    text-align: left;
}

.gear-dropdown:hover .gear-dropdown-content {
    visibility: visible;
    opacity: 1;
    top: calc(100% + 2px);
}

.gear-dropdown-item {
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
    text-transform: none;
    display: block;
    border-bottom: 1px solid #f8fafc;
}

.gear-dropdown-item:last-child {
    border-bottom: none;
}

.gear-dropdown-item:hover {
    background-color: #f0f7ff;
    color: #2563eb;
}

/* --- Dönen Dişli Renk Sınıfları --- */
.rotating-icon, .rotating-IsIntegrated-icon, .rotating-integrationCode-icon {
    transition: transform 0.5s ease-in-out;
    display: inline-block;
}

.rotate-0, .rotate-IsIntegrated-0, .rotate-integrationCode-0 {
    transform: rotate(0deg);
    color: #3b82f6;
    font-size: 1.15rem;
}

.rotate-1 {
    transform: rotate(90deg);
    color: #f59e0b;
    font-size: 1.15rem;
}

.rotate-2 {
    transform: rotate(180deg);
    color: #10b981;
    font-size: 1.15rem;
}

.rotate-IsIntegrated-1 {
    transform: rotate(120deg);
    color: #eab308;
    font-size: 1.15rem;
}

.rotate-IsIntegrated-2 {
    transform: rotate(240deg);
    color: #9ca3af;
    font-size: 1.15rem;
}

.rotate-integrationCode-1 {
    transform: rotate(60deg);
    color: #10b981;
    font-size: 1.15rem;
}

.rotate-integrationCode-2 {
    transform: rotate(120deg);
    color: #eab308;
    font-size: 1.15rem;
}

.rotate-integrationCode-3 {
    transform: rotate(180deg);
    color: #f97316;
    font-size: 1.15rem;
}

.rotate-integrationCode-4 {
    transform: rotate(240deg);
    color: #ec4899;
    font-size: 1.15rem;
}

.rotate-integrationCode-5 {
    transform: rotate(300deg);
    color: #a855f7;
    font-size: 1.15rem;
}

/* --- Durum Rozetleri (Status Badge) --- */
.status-badge-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
    transition: all 0.2s ease;
    min-width: 75px;
}

.status-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 5px rgba(0,0,0,0.15);
}

.status-text {
    font-size: 9.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* --- Sayfalama (Pagination - image8-pagging) --- */
.image8-pagging {
    display: inline-flex;
    align-items: center;
    background: transparent;
    height: 38px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    overflow: hidden;
}

.image8-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-right: 1px solid #cbd5e1;
    background-color: #ffffff;
    width: 38px;
    height: 38px;
    margin: 0;
    padding: 0;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
    color: #64748b;
}

.image8-btn:last-child {
    border-right: none;
}

.image8-current-page-input {
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-right: 1px solid #cbd5e1;
    background-color: #ffffff;
    width: 48px;
    height: 38px;
    margin: 0;
    padding: 0;
    text-align: center;
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    outline: none;
    transition: box-shadow 0.2s, color 0.2s;
    cursor: pointer;
}

.image8-current-page-input:focus {
    box-shadow: inset 0 0 0 2px #305b9f;
    color: #305b9f;
    z-index: 10;
    cursor: text;
}

.image8-btn:hover:not(:disabled) {
    background-color: #f8fafc;
    color: #305b9f;
}

.image8-current-page-input:hover:not(:focus) {
    background-color: #f8fafc;
}

.image8-btn:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.image8-current-page-input::-webkit-outer-spin-button,
.image8-current-page-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.image8-current-page-input[type=number] {
    -moz-appearance: textfield;
}

/* --- Genel Modal & Maske Stilleri --- */
.modal-mask {
    position: fixed;
    z-index: 9998;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(2px);
    display: table;
    transition: opacity 0.3s ease;
}

.modal-wrapper {
    display: table-cell;
    vertical-align: middle;
}

.modal-container {
    width: 90%;
    max-width: 500px;
    margin: 0px auto;
    padding: 0px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow: hidden;
}

.modal-header {
    background-color: #f8fafc;
    color: #1e293b;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 600;
    border-bottom: 1px solid #e2e8f0;
}

.modal-body {
    padding: 24px;
    font-size: 14px;
    color: #334155;
}

.modal-footer {
    padding: 16px 24px;
    background-color: #f8fafc;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* --- Dinamik Bildirim Alanı (Premium) --- */
.notification-area {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    max-height: 100px;
    opacity: 1;
}

.notification-enter-active, .notification-leave-active {
    transition: all 0.5s ease;
}

.notification-enter, .notification-leave-to {
    max-height: 0;
    opacity: 0;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

.notification-box {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 18px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    font-size: 13.5px;
    font-weight: 500;
    animation: slideDown 0.4s ease-out;
}

@keyframes slideDown {
    from { transform: translateY(-10px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.notification-info {
    background-color: #f0f9ff;
    color: #0369a1;
}
.notification-info i { color: #0ea5e9; }

.notification-success {
    background-color: #f0fdf4;
    color: #15803d;
}
.notification-success i { color: #22c55e; }

.notification-warning {
    background-color: #fffbeb;
    color: #a16207;
}
.notification-warning i { color: #f59e0b; }

.notification-error {
    background-color: #fef2f2;
    color: #b91c1c;
}
.notification-error i { color: #ef4444; }

.notification-text {
    flex: 1;
    line-height: 1.4;
}

.notification-close {
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s;
    font-size: 14px;
}
.notification-close:hover {
    opacity: 1;
}

/* --- Sipariş Numarası Kopyalama Butonu --- */
.copy-remarks-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 6px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 11px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.copy-remarks-btn:hover {
    background: #eff6ff;
    border-color: #3b82f6;
    color: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.copy-remarks-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.remarks-wrapper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 140px;
}

/* --- İrsaliye Teslimat Detay Kartı (Accordion Row) --- */
.waybill-detail-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    position: relative;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.waybill-card-title {
    font-size: 13px;
    font-weight: 700;
    color: #305b9f;
    margin-bottom: 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid #e2e8f0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.waybill-form-group {
    margin-bottom: 10px;
}

.waybill-form-group label {
    font-size: 12px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 4px;
    display: block;
}

.waybill-form-group .form-control,
.waybill-form-group select,
.waybill-form-group input {
    width: 100%;
    padding: 6px 10px;
    font-size: 13px;
    color: #1e293b;
    background-color: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.waybill-form-group .form-control:focus,
.waybill-form-group select:focus,
.waybill-form-group input:focus {
    border-color: #305b9f;
    box-shadow: 0 0 0 2px rgba(48, 91, 159, 0.15);
}

.waybill-save-btn {
    background-color: #305b9f;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 8px 24px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    transition: all 0.2s ease;
}

.waybill-save-btn:hover:not(:disabled) {
    background-color: #1e3a8a;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.waybill-save-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* --- Yükleme Döndürücüsü (Half Circle Spinner) --- */
.half-circle-spinner, .half-circle-spinner * {
    box-sizing: border-box;
}

.half-circle-spinner {
    width: 60px;
    height: 60px;
    border-radius: 100%;
    position: relative;
}

.half-circle-spinner .circle {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 100%;
    border: calc(60px / 10) solid transparent;
}

.half-circle-spinner .circle.circle-1 {
    border-top-color: #5f78a8;
    animation: half-circle-spinner-animation 1s infinite;
}

.half-circle-spinner .circle.circle-2 {
    border-bottom-color: #305b9f;
    animation: half-circle-spinner-animation 1s infinite alternate;
}

@keyframes half-circle-spinner-animation {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* --- Dışa Aktarma Dropdown Menüsü --- */
.export-button {
    cursor: pointer;
    display: inline-block;
}

.dropdown-menu {
    position: absolute;
    background-color: #fff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    padding: 8px 0;
    border-radius: 6px;
    width: 150px;
}

.dropdown-list {
    list-style-type: none;
    margin: 0;
    padding: 0;
}

.dropdown-item {
    padding: 8px 16px;
    cursor: pointer;
    font-weight: 500;
    font-size: 14px;
    color: #334155;
    transition: background-color 0.2s;
}

.dropdown-item:hover {
    background-color: #f1f5f9;
}

/* --- Medya Sorguları (Responsive) --- */
@media screen and (max-width: 1400px) {
    .hide-on-small-screen {
        display: none !important;
    }
}

@media screen and (max-width: 1024px) {
    .glasscad-clean-table th,
    .glasscad-clean-table tbody td {
        padding: 8px 10px !important;
        font-size: 12px !important;
    }

    .soft-icon {
        font-size: 18px !important;
        margin: 0 8px !important;
    }
}

@media screen and (max-width: 768px) {
    .top-action-bar-wrapper {
        flex-direction: column !important;
        align-items: flex-start !important;
        height: auto !important;
        padding: 10px !important;
    }

    .top-icons-left,
    .top-icons-right {
        width: 100%;
        justify-content: flex-start !important;
        flex-wrap: wrap !important;
        margin-bottom: 8px !important;
    }

    .top-icons-right {
        margin-bottom: 0 !important;
    }

    .soft-icon {
        margin: 6px !important;
    }

    .filter-box {
        width: 95% !important;
        right: 2.5% !important;
        top: auto !important;
    }

    .page-info-mobile-fix {
        position: relative !important;
        left: 0 !important;
        width: 100%;
        text-align: center;
        margin-bottom: 10px;
    }
}
