@import url('./icons.css');

html, body {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

.button-link {
    text-decoration: unset;
}

.title {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1rem 0;
}

.title.title-secondary {
    padding: 0.313rem 0 0;
    color: var(--bs-secondary-color);
}

.title-header-text {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 2.5rem;
}

.title-content-text {
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0;
    line-height: 1.375rem;
}

.main-content {
    align-items: center;
    display: flex;
    height: 100%;
    justify-content: center;
    width: 100%;
}

/* ===== GLOBAL RESPONSIVE STYLES ===== */

/* Page Header - Desktop */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 15px 0;
    border-bottom: 1px solid #e0e0e0;
    flex-wrap: wrap;
    gap: 10px;
}

.page-header h3 {
    margin: 0;
    color: #333;
    flex-shrink: 0;
}

.page-header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

/* Toolbar Row */
.toolbar-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    flex-wrap: wrap;
    gap: 10px;
}

.assignment-section,
.auto-fill-section {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

/* Grid Container */
.grid-container {
    position: relative;
    overflow-x: auto;
}

/* ===== TABLET RESPONSIVE (max-width: 992px) ===== */
@media (max-width: 992px) {
    .page-header {
        padding: 12px 0;
    }

    .page-header-actions {
        gap: 6px;
    }

    /* DevExpress buttons smaller */
    .page-header-actions .dxbl-btn,
    .toolbar-row .dxbl-btn {
        padding: 0.375rem 0.75rem !important;
        font-size: 0.875rem !important;
    }

    /* Hide button text on tablet, show only icons */
    .page-header-actions .dxbl-btn .dxbl-btn-text {
        display: none;
    }

    .combo-box {
        width: 150px !important;
        min-width: 120px !important;
    }
}

/* ===== MOBILE RESPONSIVE (max-width: 768px) ===== */
@media (max-width: 768px) {
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        padding: 10px 0;
        gap: 12px;
    }

    .page-header h3 {
        font-size: 1.25rem;
        width: 100%;
    }

    .page-header-actions {
        width: 100%;
        justify-content: flex-start;
        gap: 6px;
    }

    /* DevExpress buttons - icon only on mobile */
    .page-header-actions .dxbl-btn {
        padding: 0.5rem !important;
        min-width: 40px !important;
    }

    .page-header-actions .dxbl-btn .dxbl-btn-text {
        display: none !important;
    }

    /* Toolbar row - stack on mobile */
    .toolbar-row {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        padding: 12px;
    }

    .assignment-section,
    .auto-fill-section {
        width: 100%;
        justify-content: space-between;
    }

    .combo-box {
        width: 100% !important;
        min-width: unset !important;
        flex: 1;
    }

    /* Date picker responsive */
    .dxbl-date-edit {
        min-width: 120px !important;
    }

    /* Grid responsive */
    .orders-grid,
    .users-grid {
        height: calc(100vh - 280px) !important;
        min-height: 300px;
    }

    /* DevExpress Grid - horizontal scroll */
    .dxbl-grid {
        overflow-x: auto !important;
    }

    /* Title adjustments */
    .title-header-text {
        font-size: 1.5rem;
        line-height: 2rem;
    }
}

/* ===== POPUP RESPONSIVE ===== */
@media (max-width: 768px) {
    /* DevExpress Popup - mobilde tam genişlik zorla */
    .dxbl-popup,
    .dxbl-popup-content,
    .dxbl-popup-dialog,
    .dxbl-popup-root,
    .dxbl-modal-content,
    .dxbl-modal-dialog {
        max-width: calc(100vw - 20px) !important;
        width: calc(100vw - 20px) !important;
        margin-left: 10px !important;
        margin-right: 10px !important;
        left: 0 !important;
        right: 0 !important;
    }

    .dxbl-popup-body {
        max-width: 100% !important;
        overflow-x: hidden !important;
    }

    .form-popup-footer {
        flex-direction: column;
        gap: 10px;
    }

    .form-popup-footer-right {
        width: 100%;
        justify-content: flex-end;
    }
}

/* ===== SMALL MOBILE (max-width: 480px) ===== */
@media (max-width: 480px) {
    .page-header h3 {
        font-size: 1.1rem;
    }

    .page-header-actions .dxbl-btn {
        padding: 0.4rem !important;
        min-width: 36px !important;
    }

    .toolbar-row {
        padding: 10px;
    }

    .assignment-section,
    .auto-fill-section {
        flex-direction: column;
        gap: 8px;
    }

    .assignment-section > *,
    .auto-fill-section > * {
        width: 100%;
    }

    /* Grid even smaller */
    .orders-grid,
    .users-grid {
        height: calc(100vh - 250px) !important;
        min-height: 250px;
    }

    .title-header-text {
        font-size: 1.25rem;
        line-height: 1.75rem;
    }
}
