/* Unified Admin Dashboard Styles */

:root {
    --primary-color: #374151;
    --secondary-color: #6b7280;
    --success-color: #10b981;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #0ea5e9;
    --dark-bg: #0a0a0a;
    --dark-border: rgba(255, 255, 255, 0.1);
}

body {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 50%, #e2e8f0 100%);
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', 'Helvetica Neue', sans-serif;
    color: #334155;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

[x-cloak] {
    display: none !important;
}

/* Login Overlay */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #000000 0%, #0a0a0a 50%, #050505 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

/* Cards */
.card {
    border-radius: 12px;
    transition: transform 0.2s;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    color: #334155;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.card:hover {
    transform: translateY(-2px);
}

/* Stats Cards */
.card .fa-2x {
    font-size: 2.5rem;
}

/* Navbar */
.navbar-brand {
    font-size: 1.25rem;
}

/* Tables */
.table {
    font-size: 0.95rem;
}

.table th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    color: #64748b;
    border-bottom: 2px solid #e2e8f0;
}

/* Badges */
.badge {
    padding: 0.4em 0.8em;
    font-weight: 500;
}

/* Buttons */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    letter-spacing: 0.025em;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
    border-radius: 6px;
}

/* Forms */
.form-control, .form-select {
    border-radius: 6px;
    background-color: #ffffff;
    border: 1px solid #d1d5db;
    color: #374151;
    transition: border-color 0.2s;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    background-color: #ffffff;
    box-shadow: 0 0 0 3px rgba(55, 65, 81, 0.1);
}

.form-label {
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

/* Tabs */
.nav-tabs .nav-link {
    border: none;
    color: #64748b;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    border-radius: 8px 8px 0 0;
}

.nav-tabs .nav-link:hover {
    background-color: #f8fafc;
    color: #334155;
}

.nav-tabs .nav-link.active {
    background-color: #ffffff;
    color: var(--primary-color);
    border-bottom: 2px solid var(--primary-color);
}

/* Modals */
.modal-content {
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    background-color: #ffffff;
    color: #334155;
}

.modal-header {
    border-bottom: 1px solid #e2e8f0;
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid #e2e8f0;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
}

/* Ensure proper button spacing in modal footers */
.modal-footer .btn {
    margin: 0;
}

.modal-footer.d-flex.justify-content-between {
    justify-content: space-between;
}

/* Spinner */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15rem;
}

/* Loading States */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Button loading state fixes */
.btn {
    min-height: calc(1.5em + 0.75rem + 2px);
}

.btn .spinner-border-sm {
    width: 0.875rem;
    height: 0.875rem;
    vertical-align: middle;
}

.btn-loading-text {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Skeleton Loader Animation */
@keyframes skeleton-loading {
    0% {
        background-color: #f3f4f6;
    }
    50% {
        background-color: #e5e7eb;
    }
    100% {
        background-color: #f3f4f6;
    }
}

.skeleton {
    animation: skeleton-loading 1.5s infinite ease-in-out;
    border-radius: 4px;
}

.skeleton-text {
    height: 1rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

.skeleton-box {
    height: 100px;
    background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: 8px;
}

/* Loading overlay for cards */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    border-radius: 12px;
}

/* Disabled state */
.btn:disabled,
.btn.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
    background: #e5e7eb !important;
    border-color: #d1d5db !important;
    color: #9ca3af !important;
    pointer-events: none;
}

.btn:disabled::before,
.btn.disabled::before {
    display: none;
}

/* Loading state buttons */
.btn-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: button-loading-spinner 1s ease infinite;
}

@keyframes button-loading-spinner {
    from {
        transform: rotate(0turn);
    }
    to {
        transform: rotate(1turn);
    }
}

/* Focus states for accessibility */
.btn:focus {
    outline: 2px solid transparent;
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(55, 65, 81, 0.2);
}

.btn-primary:focus {
    box-shadow: 0 0 0 3px rgba(55, 65, 81, 0.3);
}

.btn-success:focus {
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.3);
}

.btn-danger:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.3);
}

.btn-warning:focus {
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.3);
}

/* Navbar enhancements */
.navbar {
    background: linear-gradient(135deg, var(--primary-color) 0%, #3730a3 100%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Button styling improvements - Beautiful purple gradient */
.btn-primary {
    background: linear-gradient(135deg, #4f46e5 0%, #3730a3 100%);
    border: none;
    color: white;
    box-shadow: 0 2px 4px rgba(79, 70, 229, 0.2);
    font-weight: 500;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #3730a3 0%, #312e81 100%);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
    transform: translateY(-1px);
    color: white;
}

.btn-primary:active,
.btn-primary:focus {
    background: linear-gradient(135deg, #312e81 0%, #1e1b4b 100%);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.4);
    color: white;
}

.btn-outline-light {
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.5);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
    transform: translateY(-1px);
}

/* Stats Cards Enhanced */
.card-body h6 {
    color: #64748b;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.card-body h3 {
    color: #1e293b;
    font-weight: 700;
}

.card .fa-2x {
    opacity: 0.6;
}

.text-primary .fa-2x {
    color: rgba(79, 70, 229, 0.8) !important;
}

.text-warning .fa-2x {
    color: rgba(245, 158, 11, 0.8) !important;
}

.text-success .fa-2x {
    color: rgba(16, 185, 129, 0.8) !important;
}

.text-info .fa-2x {
    color: rgba(14, 165, 233, 0.8) !important;
}

/* Calendar-specific styles */
.calendar-event {
    border-left: 4px solid var(--primary-color);
    padding-left: 12px;
    margin-bottom: 8px;
}

.event-time {
    font-size: 0.85rem;
    color: #6b7280;
    font-weight: 500;
}

.event-title {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 2px;
}

.event-location {
    font-size: 0.8rem;
    color: #9ca3af;
}

/* Contact list styles */
.contact-card {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    transition: border-color 0.2s ease;
}

.contact-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.1);
}

.contact-name {
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 0.25rem;
}

.contact-details {
    font-size: 0.85rem;
    color: #6b7280;
}

/* Preferences styles */
.preference-item {
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
    background: #f9fafb;
}

.preference-key {
    font-weight: 600;
    color: #374151;
    font-size: 0.9rem;
}

.preference-value {
    color: #6b7280;
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

/* Activity log styles */
.activity-item {
    padding: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-time {
    font-size: 0.8rem;
    color: #9ca3af;
    font-weight: 500;
}

.activity-description {
    color: #374151;
    margin-top: 0.25rem;
}

/* Minimal Button Styles */
.btn-xs {
    min-height: 24px;
    padding: 0.125rem 0.25rem;
    font-size: 0.65rem;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Button group styling */
.btn-group .btn {
    border-radius: 0;
    border-right-width: 0;
}

.btn-group .btn:first-child {
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

.btn-group .btn:last-child {
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
    border-right-width: 1.5px;
}

.btn-group .btn:only-child {
    border-radius: 8px;
    border-right-width: 1.5px;
}

/* Transitions for Alpine.js */
[x-transition\:enter] {
    transition: opacity 0.3s ease-out;
}

[x-transition\:enter-start] {
    opacity: 0;
}

[x-transition\:enter-end] {
    opacity: 1;
}

[x-transition\:leave] {
    transition: opacity 0.2s ease-in;
}

[x-transition\:leave-start] {
    opacity: 1;
}

[x-transition\:leave-end] {
    opacity: 0;
}

/* Responsive Design */

/* Large Tablets and Small Desktops */
@media (max-width: 1200px) {
    .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }

    .stats-cards .col-md-3 {
        margin-bottom: 1rem;
    }

    .nav-tabs .nav-link {
        padding: 0.5rem 1rem;
        font-size: 0.95rem;
    }
}

/* Tablets */
@media (max-width: 992px) {
    /* Navbar optimization for tablet */
    .navbar {
        padding: 0.75rem 1rem;
    }

    .navbar-brand {
        font-size: 1.1rem;
    }

    .navbar .btn {
        font-size: 0.85rem;
        padding: 0.5rem 0.875rem;
        margin-left: 0.25rem;
    }

    .navbar .d-flex {
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    /* Stats cards for tablet */
    .stats-cards .col-md-3 {
        flex: 0 0 50%;
        max-width: 50%;
    }

    /* Tab controls for tablet */
    .nav-tabs {
        flex-wrap: wrap;
        border-bottom: 1px solid #dee2e6;
    }

    .nav-tabs .nav-link {
        padding: 0.75rem 1rem;
        margin-bottom: -1px;
        white-space: nowrap;
    }

    /* Table controls */
    .d-flex.align-items-center.gap-2 {
        flex-direction: column;
        align-items: stretch !important;
        gap: 0.75rem !important;
    }

    .d-flex.align-items-center.gap-2 input {
        width: 100% !important;
        margin-bottom: 0;
    }

    .d-flex.align-items-center.gap-2 .btn {
        width: 100%;
        justify-content: center;
    }

    /* Tables for tablet */
    .table-responsive {
        border-radius: 8px;
        box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05);
    }

    .table {
        font-size: 0.85rem;
        margin-bottom: 0;
    }

    .table th,
    .table td {
        padding: 0.75rem 0.5rem;
        vertical-align: middle;
    }

    .table .btn-sm {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
}

/* Mobile Phones */
@media (max-width: 768px) {
    /* Container and spacing */
    .container-fluid {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    /* Navbar for mobile */
    .navbar {
        padding: 0.5rem 0.75rem;
    }

    .navbar-brand {
        font-size: 1rem;
    }

    .navbar .btn {
        font-size: 0.75rem;
        padding: 0.375rem 0.625rem;
        min-height: 36px;
    }

    .navbar .d-flex {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 0.5rem;
    }

    .navbar .d-flex > *:not(.navbar-brand) {
        order: 2;
    }

    /* Stats cards for mobile - single column */
    .stats-cards .col-md-3 {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 1rem;
    }

    .stats-cards .card {
        margin-bottom: 0;
    }

    /* Card spacing */
    .card {
        margin-bottom: 1.5rem;
        border-radius: 12px;
    }

    .card-body {
        padding: 1rem;
    }

    .card-title {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }

    /* Tabs for mobile */
    .nav-tabs {
        border-bottom: 1px solid #dee2e6;
        overflow-x: auto;
        overflow-y: hidden;
        flex-nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .nav-tabs .nav-item {
        flex-shrink: 0;
    }

    .nav-tabs .nav-link {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
        white-space: nowrap;
        border-radius: 0;
        border: none;
        border-bottom: 3px solid transparent;
    }

    .nav-tabs .nav-link.active {
        border-bottom-color: var(--primary-color);
        background-color: transparent;
        color: var(--primary-color);
        font-weight: 600;
    }

    /* Tables for mobile */
    .table-responsive {
        border: none;
        box-shadow: none;
    }

    .table {
        font-size: 0.8rem;
    }

    .table th,
    .table td {
        padding: 0.5rem 0.25rem;
        border-top: 1px solid #dee2e6;
    }

    .table th {
        font-size: 0.75rem;
        font-weight: 600;
        background-color: #f8f9fa;
        position: sticky;
        top: 0;
        z-index: 10;
    }

    /* Action buttons in tables */
    .table .btn-sm {
        padding: 0.25rem 0.375rem;
        font-size: 0.7rem;
        min-height: 28px;
        min-width: 28px;
    }

    .table .btn-sm i {
        font-size: 0.7rem;
    }

    /* Hide text in action buttons on very small screens */
    .table .btn-sm .btn-text {
        display: none;
    }

    /* Form controls for mobile */
    .form-control,
    .form-select {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 0.75rem;
        border-radius: 8px;
    }

    .form-label {
        font-size: 0.9rem;
        font-weight: 500;
        margin-bottom: 0.5rem;
    }

    /* Modals for mobile */
    .modal-dialog {
        margin: 0.5rem;
        max-width: none;
        width: auto;
    }

    .modal-content {
        border-radius: 12px;
    }

    .modal-header {
        padding: 1rem;
        border-bottom: 1px solid #dee2e6;
    }

    .modal-body {
        padding: 1rem;
    }

    .modal-footer {
        padding: 1rem;
        border-top: 1px solid #dee2e6;
        flex-direction: column !important;
        gap: 0.75rem !important;
        justify-content: stretch !important;
    }

    .modal-footer .btn {
        width: 100%;
        margin: 0;
        justify-self: stretch;
    }

    .modal-footer .btn + .btn {
        margin-left: 0;
    }

    /* Reverse button order on mobile for better UX */
    .modal-footer {
        flex-direction: column-reverse !important;
    }

    /* Activity log specific mobile optimizations */
    #activityTable th:nth-child(1),
    #activityTable td:nth-child(1) {
        display: none; /* Hide ID column on mobile */
    }

    .activity-item {
        padding: 1rem;
        border-bottom: 1px solid #dee2e6;
        border-radius: 8px;
        margin-bottom: 0.5rem;
        background-color: #f8f9fa;
    }
}

/* Very Small Mobile Phones */
@media (max-width: 480px) {
    .container-fluid {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    .card-body {
        padding: 0.75rem;
    }

    .nav-tabs .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }

    .table th,
    .table td {
        padding: 0.375rem 0.125rem;
        font-size: 0.75rem;
    }

    /* Stack table content vertically on very small screens */
    .table-mobile-stack {
        display: block;
        width: 100%;
    }

    .table-mobile-stack thead {
        display: none;
    }

    .table-mobile-stack tbody,
    .table-mobile-stack tr,
    .table-mobile-stack td {
        display: block;
        width: 100%;
    }

    .table-mobile-stack tr {
        border: 1px solid #dee2e6;
        border-radius: 8px;
        margin-bottom: 0.75rem;
        padding: 0.75rem;
        background-color: #ffffff;
    }

    .table-mobile-stack td {
        border: none;
        padding: 0.25rem 0;
        text-align: left !important;
    }

    .table-mobile-stack td:before {
        content: attr(data-label) ": ";
        font-weight: 600;
        color: #6b7280;
        display: inline-block;
        width: 80px;
        font-size: 0.75rem;
    }
}

/* Clean table styling */
.table-hover tbody tr:hover {
    background-color: #f8fafc;
}

/* Touch-friendly improvements */
@media (hover: none) {
    .btn:hover {
        transform: none !important;
    }

    .card:hover {
        transform: none !important;
    }

    .btn:active {
        transform: scale(0.98) !important;
        transition: transform 0.1s ease;
    }
}

/* Mobile-first improvements */
.btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-sm {
    min-height: 36px;
}

.btn-xs {
    min-height: 24px;
    padding: 0.125rem 0.25rem;
    font-size: 0.65rem;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Search input styling - removed to avoid conflicts */

/* Add button width */
.btn-add {
    min-width: 120px;
}

/* Table action buttons - compact size for data tables */
.btn-table-action {
    width: 28px;
    height: 28px;
    padding: 0.25rem !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-table-action i {
    font-size: 0.7rem;
}

/* Loading spinners */
.spinner-lg {
    width: 3rem;
    height: 3rem;
}

.spinner-xs {
    width: 0.7rem;
    height: 0.7rem;
}

/* Text sizes */
.text-xs {
    font-size: 0.65rem;
}

.text-sm {
    font-size: 0.85rem;
}

.icon-sm {
    font-size: 0.7rem;
}

/* Activity log data display */
.activity-data {
    max-height: 300px;
    overflow-y: auto;
    font-size: 0.85rem;
}

/* Activity data preview tooltip styling */
.activity-data-preview {
    cursor: help;
    transition: opacity 0.2s ease;
}

.activity-data-preview:hover {
    opacity: 0.8;
}

/* Custom tooltip styling for activity data */
.tooltip {
    pointer-events: none;
}

.tooltip-inner {
    max-width: 400px;
    text-align: left;
    font-family: 'SFMono-Regular', 'Monaco', 'Consolas', 'Liberation Mono', 'Courier New', monospace;
    font-size: 0.75rem;
    line-height: 1.4;
    padding: 0.75rem;
    background-color: #1a1a1a;
    color: #e5e5e5;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Responsive tooltip adjustments */
@media (max-width: 768px) {
    .tooltip-inner {
        max-width: 280px;
        font-size: 0.7rem;
        padding: 0.5rem;
    }
}

/* Table column widths */
.col-15 {
    width: 15%;
}

.col-25 {
    width: 25%;
}

.col-45 {
    width: 45%;
}

/* Refresh button alignment */
.btn-refresh {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Searchable dropdown styling */
.searchable-dropdown-item {
    transition: background-color 0.15s ease;
}

.searchable-dropdown-item:hover {
    background-color: var(--bs-light) !important;
}

.searchable-dropdown-item.selected {
    background-color: var(--bs-primary) !important;
    color: white !important;
}

/* Settings table styling */
.table tbody tr:hover {
    background-color: rgba(0,123,255,0.02);
}

.badge.rounded-pill {
    padding: 0.35em 0.65em;
    font-weight: 500;
}

code {
    font-size: 0.875rem;
    font-weight: 600;
}

.input-group-sm .btn {
    padding: 0.25rem 0.75rem;
}

/* ========== Minimalist Design ========== */

/* Minimal Category Filter */
.category-filter-minimal {
    border-bottom: 1px solid #e9ecef;
    padding-bottom: 0.75rem;
}

.filter-nav {
    display: inline-flex;
    gap: 1.5rem;
}

.filter-btn-minimal {
    background: none;
    border: none;
    color: #6c757d;
    padding: 0;
    font-size: 0.875rem;
    transition: color 0.15s ease;
    cursor: pointer;
    position: relative;
    padding-bottom: 0.25rem;
}

.filter-btn-minimal:hover {
    color: #495057;
}

.filter-btn-minimal.active {
    color: #212529;
    font-weight: 500;
}

.filter-btn-minimal.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #212529;
}

/* Minimal Loading Animation */
.loading-dots {
    display: inline-block;
    animation: loading-dots 1.4s infinite;
}

@keyframes loading-dots {
    0%, 60%, 100% { opacity: 0.3; }
    20% { opacity: 1; }
    40% { opacity: 0.6; }
}

/* Clean table styling */
.table-minimal {
    border-collapse: separate;
    border-spacing: 0;
}

.table-minimal th {
    font-weight: 500;
    color: #6c757d;
    border-bottom: 1px solid #dee2e6;
    padding: 0.75rem;
}

.table-minimal td {
    padding: 0.75rem;
    border-bottom: 1px solid #f8f9fa;
}

.table-minimal tbody tr:hover {
    background-color: #fafbfc;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .filter-nav {
        flex-wrap: wrap;
        gap: 1rem;
    }

    .filter-btn-minimal {
        font-size: 0.8125rem;
    }
}

/* Fix text selection for textareas and monospace inputs */
/* More specific selectors to override any conflicting styles */
textarea.form-control,
textarea.font-monospace,
.form-control.font-monospace,
textarea.form-control.font-monospace,
input[type="text"].font-monospace,
input[type="text"].form-control {
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
    user-select: text !important;
    /* Additional properties to ensure selection works */
    -webkit-touch-callout: default !important;
    -khtml-user-select: text !important;
}

/* ========== Inline Editing Styles ========== */

/* Display mode - subtle hover effect */
.inline-edit-display {
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    min-height: 38px;
    display: flex;
    align-items: center;
}

.inline-edit-display:hover {
    background-color: #f8f9fa;
    border-color: #dee2e6;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.inline-edit-display:hover .fa-pencil-alt {
    opacity: 1 !important;
    color: #6c757d !important;
}

/* Edit mode container */
.inline-edit-container {
    position: relative;
}

/* Input group refinements for inline editing */
.inline-edit-container .input-group-sm .form-control {
    border-radius: 4px 0 0 4px;
    border-right: none;
    font-size: 0.875rem;
    padding: 0.375rem 0.5rem;
    height: 32px;
}

.inline-edit-container .input-group-sm .btn {
    border-radius: 0;
    border-left: none;
    padding: 0.375rem 0.5rem;
    min-width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.inline-edit-container .input-group-sm .btn:last-child {
    border-radius: 0 4px 4px 0;
}

/* Focused input styling */
.inline-edit-container .form-control:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
    z-index: 3;
    border-right: 1px solid #86b7fe;
}

.inline-edit-container .form-control:focus + .btn {
    border-left-color: #86b7fe;
}

/* Spinner in save button */
.inline-edit-container .spinner-border-sm {
    width: 0.875rem;
    height: 0.875rem;
}

/* Help text styling */
.inline-edit-container small {
    font-size: 0.75rem;
    opacity: 0.8;
}

/* Empty value styling */
.inline-edit-display.text-muted.fst-italic {
    color: #adb5bd !important;
}

/* Mobile responsiveness for inline editing */
@media (max-width: 768px) {
    .inline-edit-container .input-group-sm .btn {
        min-width: 36px;
        padding: 0.4rem 0.5rem;
    }

    .inline-edit-container .input-group-sm .form-control {
        font-size: 0.85rem;
        padding: 0.4rem 0.6rem;
    }

    .inline-edit-container small {
        font-size: 0.7rem;
        margin-top: 0.25rem;
    }
}

/* Ensure text selection works in all textareas */
textarea {
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
    user-select: text !important;
    -webkit-touch-callout: default !important;
    -khtml-user-select: text !important;
}

/* Fix for Alpine.js bound textareas */
textarea[x-model],
textarea[x-model="bookingInstructions"] {
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
    user-select: text !important;
    -webkit-touch-callout: default !important;
    -khtml-user-select: text !important;
}

/* Override any parent element restrictions */
div:has(textarea),
.card-body:has(textarea) {
    -webkit-user-select: auto !important;
    -moz-user-select: auto !important;
    -ms-user-select: auto !important;
    user-select: auto !important;
}

/* ========== Template Variables Section ========== */

.template-vars-section {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.template-vars-header {
    display: flex;
    align-items: center;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.template-vars-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    align-items: center;
}

.template-var-tag {
    display: inline-block;
    background: #f8fafc;
    border: none;
    border-radius: 3px;
    padding: 0.125rem 0.375rem;
    font-size: 0.75rem;
    font-family: 'SFMono-Regular', 'Monaco', 'Consolas', 'Liberation Mono', 'Courier New', monospace;
    color: #64748b;
    cursor: pointer;
    user-select: all;
    transition: background-color 0.1s ease;
}

.template-var-tag:hover {
    background: #e2e8f0;
    color: #475569;
}

.template-var-tag:active {
    background: #cbd5e1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .template-vars-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }

    .template-vars-grid {
        gap: 0.25rem;
    }

    .template-var-tag {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
    }
}

/* User Avatar Styles - only for dropdown header now */

.user-avatar-large {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* User Dropdown Styles */
.user-dropdown {
    min-width: 180px;
    padding: 0.5rem 0;
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 8px;
}

.user-dropdown .dropdown-header {
    padding: 1rem;
    border-bottom: none;
}

.user-dropdown .dropdown-item-text {
    padding: 0.5rem 1rem;
    color: #6b7280;
}

.user-dropdown .dropdown-item {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    transition: all 0.15s ease;
}

.user-dropdown .dropdown-item:hover {
    background-color: #f8fafc;
    color: #374151;
}

/* Navbar Button Consistency */
.navbar-nav .btn {
    min-height: 31px;
    height: 31px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.375rem 0.75rem;
    line-height: 1;
    box-sizing: border-box;
}

/* User Avatar Button - Direct styling on button */
.user-avatar-btn {
    width: 31px !important;
    height: 31px !important;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    border: 1px solid rgba(255,255,255,0.3) !important;
    border-radius: 50% !important;
    padding: 0 !important;
    font-size: 10px !important;
    font-weight: 600 !important;
    letter-spacing: 0.5px !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2) !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
    position: relative;
    min-width: auto !important;
}

.user-avatar-btn:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%) !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15) !important;
}

.user-avatar-btn::after {
    content: none !important;
}

/* Dropdown menu positioning */
.navbar-nav .dropdown-toggle + .dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    left: auto;
    z-index: 1000;
    margin-top: 0.125rem;
}

/* Ensure refresh button matches other buttons */
.btn-refresh {
    min-height: 31px !important;
    height: 31px !important;
}

/* Responsive avatar adjustments */
@media (max-width: 576px) {
    .user-avatar-btn {
        width: 35px !important;
        height: 35px !important;
        font-size: 12px !important;
    }

    .navbar-nav .btn {
        min-height: 35px;
        height: 35px;
    }

    .btn-refresh {
        min-height: 35px !important;
        height: 35px !important;
    }
}

