/* Montserrat Font Registrations */
@font-face {
    font-family: 'Montserrat';
    src: url('../fonts/Montserrat-Regular.woff2') format('woff2'),
         url('../fonts/Montserrat-Regular.woff') format('woff'),
         url('../fonts/Montserrat-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}
@font-face {
    font-family: 'Montserrat';
    src: url('../fonts/Montserrat-Medium.woff2') format('woff2'),
         url('../fonts/Montserrat-Medium.woff') format('woff'),
         url('../fonts/Montserrat-Medium.ttf') format('truetype');
    font-weight: 500;
    font-style: normal;
}
@font-face {
    font-family: 'Montserrat';
    src: url('../fonts/Montserrat-Bold.woff2') format('woff2'),
         url('../fonts/Montserrat-Bold.woff') format('woff'),
         url('../fonts/Montserrat-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

/* Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: #ffffff;
    color: #000000;
    line-height: 1.5;
    padding-top: 60px; /* Space for sticky header */
    padding-bottom: 45px; /* Space for footer + margin */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
    color: #000000;
    font-weight: 700;
    margin-bottom: 1rem;
}

a, .btn-link {
    color: #000000;
    font-weight: 700;
    text-decoration: none;
    cursor: pointer;
}

a:hover, .btn-link:hover {
    text-decoration: underline;
}

/* Header Styles */
header.app-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background-color: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

header.app-header .logo-container img {
    height: 40px;
    max-width: 150px;
    object-fit: contain;
}

header.app-header .hamburger-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #000000;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Hamburger Menu Panel & Blur Effect */
.blur-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(8px);
    z-index: 1001;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.blur-overlay.active {
    display: block;
    opacity: 1;
}

.nav-drawer {
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100%;
    background-color: #ffffff;
    box-shadow: -4px 0 15px rgba(0, 0, 0, 0.1);
    z-index: 1002;
    transition: right 0.3s ease-out;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.nav-drawer.active {
    right: 0;
}

.nav-drawer .drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 15px;
}

.nav-drawer .close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #000000;
    cursor: pointer;
}

.nav-drawer ul {
    list-style: none;
}

.nav-drawer ul li {
    margin-bottom: 20px;
}

.nav-drawer ul li a {
    font-size: 18px;
    display: block;
    padding: 5px 0;
}

/* Footer Styles */
footer.app-footer {
    height: 30px;
    background-color: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999;
}

footer.app-footer p {
    font-size: 11px;
    color: #ffffff;
    font-weight: 700;
}

footer.app-footer p a {
    color: #ff3b30;
    font-weight: 700;
}

/* Layout Content Wrapper */
main.container {
    flex: 1;
    width: 100%;
    max-width: 600px; /* Restrict width for neat vertical presentation on mobile */
    margin: 0 auto;
    padding: 15px;
}

/* Red Border Container Card */
.order-card {
    border: 0.5px solid #ff3b30;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    background-color: #ffffff;
    position: relative;
    box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.order-card-header {
    border-bottom: 1px solid #e0e0e0;
    padding-bottom: 8px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.order-card-body p {
    margin-bottom: 8px;
}

.order-card-body p strong {
    font-weight: 700;
}

/* Badge Styles */
.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}
.badge-pending { background-color: #ffeeba; color: #856404; }
.badge-processing { background-color: #cce5ff; color: #004085; }
.badge-failed { background-color: #f8d7da; color: #721c24; }
.badge-to_realize { background-color: #d4edda; color: #155724; }
.badge-realizing { background-color: #e2e3e5; color: #383d41; }
.badge-completed { background-color: #000000; color: #ffffff; }

/* Booking Type Badge */
.booking-badge {
    display: inline-block;
    padding: 2px 6px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 3px;
    margin-left: 5px;
}
.booking-brak { background-color: #e2e3e5; color: #383d41; }
.booking-awizacja { background-color: #ffcc00; color: #000000; }
.booking-fix { background-color: #ff3b30; color: #ffffff; }

/* Forms & Buttons Styling */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-weight: 700;
    margin-bottom: 5px;
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 10px;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    border: 1px solid #000000;
    border-radius: 4px;
    background-color: #ffffff;
    color: #000000;
}

.form-control:focus {
    outline: none;
    border-width: 2px;
}

.btn {
    display: inline-block;
    width: 100%;
    padding: 12px;
    background-color: #000000;
    color: #ffffff;
    border: 1px solid #000000;
    border-radius: 4px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 14px;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn:hover {
    background-color: #ffffff;
    color: #000000;
}

.btn-secondary {
    background-color: #ffffff;
    color: #000000;
    border: 1px solid #000000;
}
.btn-secondary:hover {
    background-color: #000000;
    color: #ffffff;
}

.btn-danger {
    background-color: #ff3b30;
    border-color: #ff3b30;
    color: #ffffff;
}
.btn-danger:hover {
    background-color: #ffffff;
    color: #ff3b30;
}

/* Styled List of Drivers (Checkbox Selection) */
.driver-select-container {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #000000;
    border-radius: 4px;
    margin-bottom: 15px;
}

.driver-option {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #e0e0e0;
    cursor: pointer;
}

.driver-option:last-child {
    border-bottom: none;
}

.driver-option input[type="radio"], 
.driver-option input[type="checkbox"] {
    margin-right: 12px;
    width: 18px;
    height: 18px;
    accent-color: #ff3b30;
}

.driver-option span {
    font-weight: 500;
}

/* Grid layout items or list layout elements */
.alert {
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 14px;
    font-weight: 500;
}
.alert-success { background-color: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-danger { background-color: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }
.alert-info { background-color: #d1ecf1; color: #0c5460; border: 1px solid #bee5eb; }

/* Custom lightboxes */
.lightbox {
    display: none;
    position: fixed;
    z-index: 10000;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    justify-content: center;
    align-items: center;
    flex-direction: column;
}
.lightbox.active {
    display: flex;
}
.lightbox-content {
    max-width: 90%;
    max-height: 80%;
    object-fit: contain;
    border: 2px solid #ffffff;
}
.lightbox-close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: #ffffff;
    font-size: 30px;
    cursor: pointer;
    font-weight: bold;
}
.lightbox-download {
    margin-top: 15px;
    background-color: #ffffff;
    color: #000000;
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: bold;
    text-decoration: none;
    border: 1px solid #ffffff;
}
.lightbox-download:hover {
    background-color: transparent;
    color: #ffffff;
}

/* Polling toast notification */
.toast-container {
    position: fixed;
    top: 70px;
    right: 15px;
    z-index: 9999;
    max-width: 300px;
}
.toast-msg {
    background-color: #000000;
    color: #ffffff;
    border-left: 4px solid #ff3b30;
    padding: 12px 15px;
    margin-bottom: 10px;
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.15);
    font-size: 13px;
    font-weight: 500;
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: slideIn 0.3s ease-out;
}
.toast-close {
    background: none;
    border: none;
    color: #ffffff;
    cursor: pointer;
    font-size: 16px;
    margin-left: 10px;
}
@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Modal Overlay for Confirmation */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal-overlay.active {
    display: flex;
}
.modal-box {
    background-color: #ffffff;
    border: 1px solid #ff3b30;
    border-radius: 8px;
    max-width: 400px;
    width: 100%;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}
.modal-box h3 {
    margin-bottom: 15px;
}
.modal-footer {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* Multi-select bar at the top of orders page */
.multi-action-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    background-color: #f8f9fa;
    border: 1px solid #e0e0e0;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
    align-items: center;
}
.multi-action-bar span {
    font-size: 12px;
    font-weight: 700;
    flex-grow: 1;
}
.multi-action-bar select {
    padding: 6px;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    border: 1px solid #000000;
    background: #fff;
}
.multi-action-bar button {
    padding: 6px 12px;
    font-size: 12px;
    font-family: 'Montserrat', sans-serif;
    font-weight: bold;
    background: #000;
    color: #fff;
    border: 1px solid #000;
    cursor: pointer;
}
.multi-action-bar button:hover {
    background: #fff;
    color: #000;
}

/* Map specific styling */
#map-element {
    height: 400px;
    width: 100%;
    border: 1px solid #000000;
    border-radius: 4px;
    margin-bottom: 15px;
}

/* Image attachment thumbnails */
.attachment-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 10px;
}
.attachment-thumb {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    cursor: pointer;
}
.attachment-thumb:hover {
    border-color: #000;
}
