/* Global fallbacks if Tailwind fails to load */
.hidden {
    display: none !important;
}

/* Minimal overlay fallback when Tailwind utilities are unavailable */
#notificationModal.fallback-open {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.5);
}

/* Tab button styles */
a.tab-button {
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    color: #e5e7eb !important;
    background-color: #374151;
    border-bottom: 2px solid transparent;
    border-top-left-radius: 0.5rem;
    border-top-right-radius: 0.5rem;
    margin-right: 0.25rem;
    transition: all 0.2s;
    text-decoration: none !important;
    display: inline-block;
    cursor: pointer;
}

a.tab-button:link,
a.tab-button:visited {
    color: #e5e7eb !important;
}

a.tab-button:hover {
    color: #ffffff !important;
    background-color: #4b5563;
    text-decoration: none !important;
}

a.tab-button.active {
    color: #ffffff !important;
    border-bottom-color: #3b82f6;
    background-color: #4b5563;
}

.custom-checkbox {
    display: none;
}

.checkbox-label {
    display: inline-block;
    width: 1.25rem;
    height: 1.25rem;
    border: 2px solid #6b7280;
    border-radius: 50%;
    background-color: #1f2937;
    position: relative;
    cursor: pointer;
    vertical-align: middle;
}

.custom-checkbox:checked + .checkbox-label {
    background-color: #ef4444;
    border-color: #ef4444;
}

.custom-checkbox:checked + .checkbox-label::after {
    content: "✓";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 0.875rem;
    font-weight: bold;
    line-height: 1;
}

.custom-checkbox:disabled + .checkbox-label {
    cursor: not-allowed;
}

/* Tab content styling */
.tab-content {
    min-height: 400px;
}

/* Tips & Strategy specific styling */
#tips-tab .boss-strategy {
    max-height: 500px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

/* Ensure the submit form in tips tab has proper spacing */
#tips-tab .bg-gray-700:last-child {
    margin-top: 1rem;
    border-top: 2px solid #4b5563;
}

/* Custom scrollbar styling for dark theme */
.boss-strategy::-webkit-scrollbar {
    width: 8px;
}

.boss-strategy::-webkit-scrollbar-track {
    background: #374151;
    border-radius: 4px;
}

.boss-strategy::-webkit-scrollbar-thumb {
    background: #6b7280;
    border-radius: 4px;
}

.boss-strategy::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Table sorting indicators */
.sort-indicator {
    display: inline-block;
    margin-left: 4px;
    font-size: 0.75rem;
    color: #60a5fa;
    font-weight: normal;
}

/* Markdown content styling for abilities */
.abilities-content {
    line-height: 1.6;
}

.abilities-content p {
    margin-bottom: 0.5rem;
}

.abilities-content p:last-child {
    margin-bottom: 0;
}

.abilities-content strong {
    color: #fbbf24;
    font-weight: 600;
}

.abilities-content ul {
    list-style-type: disc;
    margin-left: 1.5rem;
    margin-bottom: 0.5rem;
}

.abilities-content li {
    margin-bottom: 0.25rem;
}

.abilities-content code {
    background-color: rgba(55, 65, 81, 0.5);
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
    font-family: monospace;
    font-size: 0.875rem;
}

.abilities-content em {
    font-style: italic;
    color: #d1d5db;
}

/* Sortable column headers */
th[onclick*="sortTable"] {
    user-select: none;
    position: relative;
}

th[onclick*="sortTable"]:hover {
    background-color: #374151 !important;
}

/* Collapsible section for manual win entry */
.collapsible-section {
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.collapsible-section.collapsed {
    max-height: 0;
}

.collapsible-section.expanded {
    max-height: 300px;
    overflow-y: auto;
    padding-bottom: 1rem;
}

.toggle-btn {
    transition: transform 0.2s ease;
}

.toggle-btn.rotated {
    transform: rotate(180deg);
}

/* Notification Modal Styles */
.notification-item {
    transition: all 0.2s ease-in-out;
}

.notification-item:hover {
    transform: translateX(4px);
}

.notification-item.border-l-4 {
    border-left-width: 4px;
    border-left-color: #3b82f6;
}

/* Modal backdrop */
.fixed.inset-0 {
    backdrop-filter: blur(4px);
}

/* Modal animations */
@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

#notificationModal > div,
#loginNotificationModal > div {
    animation: modalFadeIn 0.2s ease-out;
}

/* Notification type badges */
.notification-item .rounded-full {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    font-weight: 600;
}

/* Notification content */
.notification-item p {
    line-height: 1.5;
    margin-bottom: 0.75rem;
}

/* Notification actions */
.notification-item button {
    transition: all 0.2s ease-in-out;
}

.notification-item button:hover {
    text-decoration: underline;
}

/* Local unread indicator for notification bell (Tailwind-independent) */
#notification-bell.has-unread {
    outline: 2px solid #ef4444; /* red */
    outline-offset: 2px;
}
#notification-bell.has-unread::after {
    content: "";
    position: absolute;
    top: 2px;
    right: 2px;
    width: 8px;
    height: 8px;
    background: #ef4444; /* red */
    border-radius: 9999px;
    box-shadow: 0 0 0 2px rgba(31, 41, 55, 1); /* dark ring to separate from bg */
}
