/* Custom styles beyond Tailwind */

/* Apply brand fonts to the whole app */
body {
    font-family: 'DM Sans', sans-serif;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Inter Tight', sans-serif;
}

h1 {
    font-weight: 900; /* Inter Tight Black */
}

h2, h3, h4 {
    font-weight: 700; /* Inter Tight Bold */
}

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

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

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Card hover effect */
.hover-card {
    transition: transform 0.2s, box-shadow 0.2s;
}

.hover-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Button styling */
.btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0.5rem 1rem !important;
    font-weight: 600 !important;
    border-radius: 0.375rem !important;
    transition: all 0.2s !important;
    cursor: pointer !important;
}

/* Primary button: Black with white text for contrast */
.btn-primary {
    background-color: #000000 !important;
    color: #ffffff !important;
    border: 2px solid #000000 !important;
}

.btn-primary:hover {
    background-color: #333333 !important;
    border-color: #333333 !important;
}

/* Secondary button: Blue accent */
.btn-secondary {
    background-color: #86D5F4 !important;
    color: #000000 !important;
    border: 2px solid #86D5F4 !important;
}

.btn-secondary:hover {
    background-color: #67c0e8 !important;
    border-color: #67c0e8 !important;
}

/* Outline button */
.btn-outline {
    background-color: transparent !important;
    color: #000000 !important;
    border: 2px solid #000000 !important;
}

.btn-outline:hover {
    background-color: #f5f5f5 !important;
}

/* Success button: Green accent */
.btn-success {
    background-color: #8EE34D !important;
    color: #000000 !important;
    border: 2px solid #8EE34D !important;
}

.btn-success:hover {
    background-color: #77d328 !important;
    border-color: #77d328 !important;
}

/* Danger button */
.btn-danger {
    background-color: #FD6EF8 !important;
    color: #000000 !important;
    border: 2px solid #FD6EF8 !important;
}

.btn-danger:hover {
    background-color: #f341ec !important;
    border-color: #f341ec !important;
}

/* Small button variant */
.btn-sm {
    padding: 0.375rem 0.75rem !important;
    font-size: 0.875rem !important;
}

/* Button animations */
.btn-animate {
    transition: all 0.2s !important;
}

.btn-animate:hover {
    transform: translateY(-2px) !important;
}

.btn-animate:active {
    transform: translateY(0) !important;
}

/* Disabled button */
.btn-disabled, .btn:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
}

/* Loading spinner - using brand color */
.spinner {
    border: 4px solid rgba(0, 0, 0, 0.1);
    border-left-color: #86D5F4; /* Brand blue */
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Tag styles */
.tag {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

.tag-tech {
    background-color: #D9DEF0; /* Brand gray */
    color: #000000;
}

.tag-business {
    background-color: #FFAA53; /* Brand orange */
    color: #000000;
}

.tag-science {
    background-color: #8EE34D; /* Brand green */
    color: #000000;
}

.tag-ai {
    background-color: #FD6EF8; /* Brand pink */
    color: #000000;
}

/* Article card */
.article-card {
    border-left: 4px solid transparent;
    transition: border-color 0.2s;
}

.article-card:hover {
    border-left-color: #86D5F4; /* Brand blue */
}

.article-selected {
    border-left-color: #86D5F4; /* Brand blue */
    background-color: #f8f9ff;
}

/* Form inputs */
.form-input {
    border: 1px solid #D9DEF0; /* Brand gray */
    border-radius: 0.375rem;
    padding: 0.5rem 0.75rem;
    background-color: white;
    transition: border-color 0.15s ease-in-out;
}

.form-input:focus {
    outline: none;
    border-color: #86D5F4; /* Brand blue */
    box-shadow: 0 0 0 3px rgba(134, 213, 244, 0.25);
}

/* Truncate text with ellipsis */
.truncate-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.truncate-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}