/* Voeg toe aan public/assets/css/custom.css */

/* Day registration cards */
.day-card {
    transition: all 0.2s ease-in-out;
}

.day-card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.day-card.rejected {
    border-left: 4px solid #ef4444;
}

.day-card.completed {
    border-left: 4px solid #10b981;
}

/* Time input styling */
input[type="time"]:focus,
input[type="number"]:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Expandable sections */
.day-details {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 500px;
    }
}

/* Form totals */
.form-totals {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
}

/* Status badges */
.status-badge {
    font-weight: 500;
    letter-spacing: 0.025em;
}

/* Responsive improvements for mobile devices */
@media (max-width: 640px) {
    /* Improve tap targets */
    a, button, [role="button"] {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
    }
    
    /* Better spacing for mobile */
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Prevent horizontal scroll */
    body {
        overflow-x: hidden;
    }
    
    /* Improve form inputs on mobile */
    input[type="text"],
    input[type="email"],
    input[type="password"],
    input[type="search"],
    input[type="tel"],
    input[type="url"],
    textarea,
    select {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Better card spacing on mobile */
    .space-y-4 > * + * {
        margin-top: 0.75rem;
    }
}
}

/* Smooth dropdown animations */
#admin-menu,
#user-menu,
#notification-dropdown {
    transition: opacity 0.1s ease-out, transform 0.1s ease-out;
}

#admin-menu.hidden,
#user-menu.hidden,
#notification-dropdown.hidden {
    opacity: 0;
    transform: scale(0.95);
}

/* Badge pulse animation */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(239, 68, 68, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

/* Mobile menu slide animation */
#mobile-menu {
    transition: transform 0.3s ease-in-out;
    transform: translateX(100%);
}

#mobile-menu.translate-x-0 {
    transform: translateX(0);
}

#mobile-menu.translate-x-full {
    transform: translateX(100%);
}

/* Backdrop fade animation */
#mobile-menu-backdrop {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Prevent body scroll when menu is open */
body.menu-open {
    overflow: hidden;
}

/* Smooth rotation for admin toggle */
.rotate-180 {
    transform: rotate(180deg);
}

#mobile-admin-icon {
    transition: transform 0.2s ease-in-out;
}

/* Responsive table utilities - UPDATED FOR FULL WIDTH */
@media (max-width: 768px) {
    /* Force table container to full width on mobile */
    .bg-white.shadow.overflow-hidden.sm\:rounded-lg {
        margin-left: -1rem;
        margin-right: -1rem;
        border-radius: 0;
        box-shadow: none;
    }
    
    /* Hide table headers on mobile */
    .responsive-table thead {
        display: none;
    }
    
    /* Display table rows as full-width cards on mobile */
    .responsive-table tbody tr {
        display: block;
        margin: 0.75rem 1rem;
        border: 1px solid #e5e7eb;
        border-radius: 0.5rem;
        background-color: white;
        box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
        padding: 0;
    }
    
    .responsive-table tbody td {
        display: block;
        text-align: right;
        padding: 0.75rem 1rem;
        position: relative;
        padding-left: 45%;
        border: none;
        border-bottom: 1px solid #f3f4f6;
        min-height: 2.5rem;
    }
    
    /* Remove border from last cell */
    .responsive-table tbody td:last-child {
        border-bottom: none;
    }
    
    /* Add labels before each cell */
    .responsive-table tbody td:before {
        content: attr(data-label);
        position: absolute;
        left: 1rem;
        text-align: left;
        font-weight: 600;
        color: #6b7280;
        font-size: 0.875rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 40%;
    }
    
    /* Special styling for status badges on mobile */
    .responsive-table .status-cell {
        text-align: left;
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .responsive-table .status-cell:before {
        display: none;
    }
    
    .responsive-table .status-cell span {
        display: inline-block;
        margin-top: 0.25rem;
    }
    
    /* Action buttons styling on mobile */
    .responsive-table .action-cell {
        text-align: center;
        padding: 1rem;
        background-color: #f9fafb;
        border-radius: 0 0 0.375rem 0.375rem;
    }
    
    .responsive-table .action-cell:before {
        display: none;
    }
    
    .responsive-table .action-cell .flex {
        justify-content: center;
        gap: 1rem;
    }
    
    /* Make first cell (invoice number) more prominent */
    .responsive-table tbody td:first-child {
        font-weight: 600;
        background-color: #f9fafb;
        border-radius: 0.375rem 0.375rem 0 0;
    }
    
    /* Pagination adjustments for mobile */
    .bg-gray-50.px-4.py-3 {
        margin-left: -1rem;
        margin-right: -1rem;
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Responsive card layout for invoice details */
.invoice-detail-card {
    transition: all 0.2s ease-in-out;
}

.invoice-detail-card:hover {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Responsive filters */
@media (max-width: 640px) {
    .filter-grid {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }
    
    .filter-grid > * {
        width: 100%;
    }
    
    /* Full width filter container on mobile */
    .bg-white.shadow.rounded-lg.mb-6.no-print {
        margin-left: -1rem;
        margin-right: -1rem;
        border-radius: 0;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    .page-break {
        page-break-after: always;
    }
    
    body {
        font-size: 12pt;
    }
    
    .print-break-inside-avoid {
        break-inside: avoid;
    }
}

/* Ensure main content doesn't overflow on mobile */
@media (max-width: 640px) {
    main {
        padding-left: 0;
        padding-right: 0;
    }
    
    main > * {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    /* Full width for specific containers */
    main > .bg-white.shadow,
    main > .bg-white.shadow.rounded-lg {
        padding-left: 0;
        padding-right: 0;
    }
}

/* Address Autocomplete Styles */
.address-autocomplete-dropdown {
    max-height: 300px;
    overflow-y: auto;
    margin-top: 4px;
}

.address-autocomplete-dropdown::-webkit-scrollbar {
    width: 6px;
}

.address-autocomplete-dropdown::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.address-autocomplete-dropdown::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 3px;
}

.address-autocomplete-dropdown::-webkit-scrollbar-thumb:hover {
    background: #ccc;
}

.address-result {
    transition: background-color 0.2s ease;
}

.address-result:hover {
    background-color: #f9fafb;
}

/* Ensure dropdown appears above other elements */
.address-autocomplete-container {
    position: relative;
    z-index: 1000;
}

/* Mobile menu touch improvements */
@media (max-width: 639px) {
    /* Make touch targets larger and more responsive */
    #mobile-menu button[type="button"] {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
        cursor: pointer;
        min-height: 44px;
        position: relative;
    }
    
    /* Add visual feedback for touch */
    #mobile-menu button[type="button"]:active {
        background-color: rgba(0, 0, 0, 0.05);
    }
    
    /* Ensure dropdowns are properly positioned */
    #mobile-menu .hidden {
        display: none !important;
    }
    
    /* Smooth transitions for accordion items */
    #mobile-menu [id$="-menu"] {
        transition: all 0.2s ease-in-out;
    }
    
    /* Ensure icons rotate smoothly */
    #mobile-menu [id$="-icon"] {
        transition: transform 0.2s ease-in-out;
        pointer-events: none;
    }
    
    /* Prevent text selection on buttons */
    #mobile-menu button {
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }
}

/* Fix job cards on mobile */
@media (max-width: 640px) {
    /* Override the main padding rules for job pages */
    .max-w-7xl.mx-auto {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    
    /* Ensure job cards stay within bounds */
    .grid > .bg-white.border {
        max-width: 100%;
        overflow: hidden;
    }
    
    /* Fix text overflow in job cards */
    .grid h3, .grid p {
        word-wrap: break-word;
        overflow-wrap: break-word;
    }
}

/* Job Applications Responsive Improvements */
@media (max-width: 640px) {
    /* Remove horizontal padding on mobile for full-width cards */
    #applications-container {
        margin-left: -1rem;
        margin-right: -1rem;
    }
    
    #applications-container > div {
        border-radius: 0;
        border-left: none;
        border-right: none;
        margin-bottom: 0.5rem;
    }
    
    /* Optimize touch targets */
    #applications-container button {
        min-height: 44px;
        touch-action: manipulation;
    }
    
    /* Better spacing for mobile cards */
    #applications-container .p-4 {
        padding: 1rem;
    }
    
    /* Ensure status badges don't overflow */
    #applications-container .inline-flex.rounded-full {
        max-width: fit-content;
        white-space: nowrap;
    }
    
    /* Optimize grid layouts for mobile */
    #applications-container .grid-cols-2 {
        gap: 0.75rem;
    }
    
    /* Ensure contact info doesn't overflow */
    #applications-container .text-sm {
        word-break: break-word;
    }
    
    /* Better button layout on mobile */
    #applications-container .flex-col.gap-2 button {
        width: 100%;
        justify-content: center;
    }
}

/* Tablet improvements (641px - 1024px) */
@media (min-width: 641px) and (max-width: 1024px) {
    #applications-container .grid-cols-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    
    #applications-container .p-6 {
        padding: 1.5rem;
    }
}

/* Smooth animations for expand/collapse */
#applications-container [id^="details-"] {
    transition: all 0.3s ease-in-out;
}

#applications-container [id^="details-"].hidden {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
}

#applications-container [id^="details-"]:not(.hidden) {
    max-height: 1000px;
    opacity: 1;
}

/* Loading states */
.animate-spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Notification styles */
.notification-toast {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Mobile notification dropdown styling */
@media (max-width: 639px) {
    #notification-dropdown {
        z-index: 9999;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    }
    
    #notification-dropdown #notification-list {
        max-height: 60vh;
    }
    
    /* Ensure notification button is clickable */
    #mobile-notifications-button {
        -webkit-tap-highlight-color: transparent;
        touch-action: manipulation;
        cursor: pointer;
    }
}