/* Custom styles for JAIP */

/* Line clamp utility */
.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Smooth transitions */
* {
    transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* HTMX loading indicator */
.htmx-indicator {
    display: none;
}

.htmx-request .htmx-indicator {
    display: inline-block;
}

.htmx-request.htmx-indicator {
    display: inline-block;
}

/* Focus styles */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

/* Form elements */
input[type="text"],
input[type="email"],
input[type="url"],
textarea,
select {
    border: 1px solid #cbd5e1;
    border-radius: 0.375rem;
    padding: 0.5rem 0.75rem;
    font-family: 'IBM Plex Mono', monospace;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="url"]:focus,
textarea:focus,
select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Button styles */
button,
.btn {
    font-family: 'IBM Plex Mono', monospace;
    font-weight: 500;
}

/* Mobile menu transition */
#mobile-menu {
    transition: max-height 0.3s ease-in-out;
}

/* PDF viewer container */
.pdf-viewer-container {
    position: relative;
    width: 100%;
    padding-bottom: 141.4%; /* A4 aspect ratio (1:√2) */
    background: #525659;
}

.pdf-viewer-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Comment thread styling */
.comment {
    border-left: 3px solid #e2e8f0;
    transition: border-color 0.2s;
}

.comment:hover {
    border-left-color: #2563eb;
}

/* Vote buttons */
.vote-btn {
    cursor: pointer;
    transition: transform 0.1s;
}

.vote-btn:active {
    transform: scale(0.95);
}

.vote-btn.voted {
    color: #2563eb;
}

/* Loading spinner */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.spinner {
    animation: spin 1s linear infinite;
}

/* Toast notifications */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 50;
    max-width: 24rem;
}
