/* SiteLib Shared Styles */
:root {
    --primary-blue: #0d6efd;
    --primary-blue-dark: #0b5ed7;
    --primary-blue-light: #6ea8fe;
    --light-blue: #e7f1ff;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-gray: #f8f9fa;
    --medium-gray: #6c757d;
    --dark-gray: #343a40;
}

/* Background Styles */
.has-background-light {
    background: linear-gradient(135deg, var(--light-blue) 0%, var(--light-gray) 100%);
}

/* Button Styles */
.button.is-primary {
    background-color: var(--primary-blue);
    border-color: var(--primary-blue);
}

.button.is-primary:hover {
    background-color: var(--primary-blue-dark);
    border-color: var(--primary-blue-dark);
}

.button.is-primary:focus, .button.is-primary.is-focused {
    background-color: var(--primary-blue);
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 0.125em rgba(13, 110, 253, 0.25);
}

/* Text Colors */
.has-text-primary {
    color: var(--primary-blue) !important;
}

/* Box & Card Styles */
.box {
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

/* Hero Full Height */
.hero.is-fullheight {
    min-height: 100vh;
}

/* Table Styles */
.table-container {
    overflow-x: auto;
}

.table.is-hoverable tbody tr:hover {
    background-color: var(--light-blue);
}

/* Navbar Styles */
.navbar.is-primary {
    background-color: var(--primary-blue) !important;
}

.navbar-item:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Tab Styles */
.tabs.is-boxed li.is-active a {
    background-color: var(--light-blue);
    border-color: var(--light-blue);
    border-bottom: 2px solid var(--primary-blue);
}

.tabs.is-boxed li.is-active a {
    color: var(--primary-blue);
}

/* Modal Styles */
.modal-card-head {
    background-color: var(--light-blue);
    border-bottom: 1px solid var(--primary-blue);
}

.modal-card-title {
    color: var(--primary-blue);
}

/* Notification Styles */
.notification.is-success {
    background-color: var(--success-color);
}

.notification.is-danger {
    background-color: var(--danger-color);
}

.notification.is-warning {
    background-color: var(--warning-color);
}

.notification.is-info {
    background-color: var(--info-color);
}

/* Toast Notification Styles */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    max-width: 350px;
    border-radius: 0.375rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateX(100%);
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    transform: translateX(0);
    pointer-events: all;
}

.toast.success {
    background-color: var(--success-color);
    color: white;
}

.toast.danger {
    background-color: var(--danger-color);
    color: white;
}

.toast.warning {
    background-color: var(--warning-color);
    color: var(--dark-gray);
}

.toast.info {
    background-color: var(--info-color);
    color: white;
}

.toast-content {
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.toast-message {
    flex: 1;
    font-weight: 500;
}

.toast-close {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    font-size: 1.25rem;
    margin-left: 1rem;
    opacity: 0.7;
}

.toast-close:hover {
    opacity: 1;
}

/* Filter Panel */
.filter-panel {
    background-color: var(--light-blue);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
    border-left: 4px solid var(--primary-blue);
}

/* Tag Styles */
.tag.is-link {
    background-color: var(--primary-blue) !important;
    color: white;
}

.tag.is-light {
    background-color: var(--light-blue);
    color: var(--primary-blue);
}

/* Gradient Headers */
.hero-gradient {
    background: linear-gradient(to right, var(--primary-blue), var(--primary-blue-light));
    color: white;
}

/* Responsive Design */
@media (max-width: 768px) {
    .toast {
        top: 10px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .box {
        margin: 0.5rem;
    }
    
    .table-container {
        margin: 0 -0.75rem;
    }
    
    .filter-panel {
        margin: 0 -0.75rem 1rem -0.75rem;
        border-radius: 0;
        border-left: none;
        border-top: 4px solid var(--primary-blue);
    }
}

/* Utility Classes */
.is-clickable {
    cursor: pointer;
}

.has-text-centered {
    text-align: center;
}

.is-fullwidth {
    width: 100%;
}

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 0.75rem !important; }
.mb-4 { margin-bottom: 1rem !important; }
.mb-5 { margin-bottom: 1.5rem !important; }

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 0.25rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 0.75rem !important; }
.mt-4 { margin-top: 1rem !important; }
.mt-5 { margin-top: 1.5rem !important; }

.p-0 { padding: 0 !important; }
.p-1 { padding: 0.25rem !important; }
.p-2 { padding: 0.5rem !important; }
.p-3 { padding: 0.75rem !important; }
.p-4 { padding: 1rem !important; }
.p-5 { padding: 1.5rem !important; }

/* User Dropdown Menu */
.user-dropdown {
    position: relative;
    display: inline-block;
}

.user-dropdown-toggle {
    cursor: pointer;
    border: none;
    background: transparent;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    color: white;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background-color 0.2s;
}

.user-dropdown-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.user-dropdown-toggle .fa-chevron-down {
    transition: transform 0.2s ease;
}

.user-dropdown.is-active .user-dropdown-toggle .fa-chevron-down {
    transform: rotate(180deg);
}

.user-dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid var(--border-color, #ddd);
    border-radius: 0.375rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
}

.user-dropdown.is-active .user-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown-item {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-color, #333);
    text-decoration: none;
    border-bottom: 1px solid var(--light-blue);
    transition: background-color 0.2s;
}

.user-dropdown-item:hover {
    background-color: var(--light-blue);
    text-decoration: none;
    color: var(--primary-blue);
}

.user-dropdown-item:last-child {
    border-bottom: none;
}

.user-dropdown-item.user-info {
    background-color: var(--light-blue);
    font-weight: 600;
    color: var(--primary-blue);
}

.user-dropdown-item.user-info:hover {
    background-color: var(--light-blue);
    cursor: default;
}

/* Floating Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
    pointer-events: none;
}

.toast {
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    margin-bottom: 10px;
    padding: 1rem 1.25rem;
    position: relative;
    pointer-events: auto;
    transform: translateX(100%);
    opacity: 0;
    transition: all 0.3s ease-in-out;
    border-left: 4px solid var(--primary-blue);
    min-width: 300px;
    max-width: 400px;
}

.toast.show {
    transform: translateX(0);
    opacity: 1;
}

.toast.hide {
    transform: translateX(100%);
    opacity: 0;
}

.toast.toast-success {
    border-left-color: #28a745;
}

.toast.toast-success .toast-icon {
    color: #28a745;
}

.toast.toast-error {
    border-left-color: #dc3545;
}

.toast.toast-error .toast-icon {
    color: #dc3545;
}

.toast.toast-warning {
    border-left-color: #ffc107;
}

.toast.toast-warning .toast-icon {
    color: #ffc107;
}

.toast.toast-info {
    border-left-color: #17a2b8;
}

.toast.toast-info .toast-icon {
    color: #17a2b8;
}

.toast-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #2c3e50;
}

.toast-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.toast-icon {
    font-size: 1.1rem;
}

.toast-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    transition: all 0.2s ease;
}

.toast-close:hover {
    background-color: #f8f9fa;
    color: #495057;
}

.toast-body {
    color: #495057;
    line-height: 1.5;
}

/* Full Width Layout */
.full-width-container {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
}

.main-content.full-width {
    padding: 1rem;
    background: #f8f9fa;
    min-height: calc(100vh - 3.5rem);
}

.content-wrapper {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 2rem;
    margin-bottom: 2rem;
}

/* Override Bulma container max-width for full width */
.is-fullwidth {
    width: 100% !important;
    max-width: 100% !important;
}
