/* ===== ENDPOINTS GRID ===== */
.endpoints-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    margin: 24px 0;
    transition: all 0.3s ease;
    width: 100%;
}

.endpoints-grid.filtering {
    opacity: 0.7;
}

/* ===== ENDPOINT CARDS ===== */
.endpoint-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 20px 28px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: all 0.2s ease;
    text-decoration: none;
    color: var(--text-primary);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    overflow: visible;
    width: 100%;
    box-sizing: border-box;
}

.endpoint-card:hover {
    border-color: var(--border-color);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.endpoint-card:focus {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

.endpoint-card.hidden {
    opacity: 0;
    transform: scale(0.95);
    pointer-events: none;
    position: absolute;
    height: 0;
    margin: 0;
    padding: 0;
    border: none;
}

.endpoint-card > * {
    position: relative;
    z-index: 2;
}

/* ===== ENDPOINT PATH WITH COPY BUTTON ===== */
.endpoint-card .endpoint-path {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 auto;  /* Allow to grow and take available space */
    min-width: 0;
    max-width: calc(100% - 60px);  /* Reserve space for copy button */
    /* Restore box styling from endpoint-content.css but prevent wrapping */
    word-break: normal;
    background: var(--bg-primary);
    padding: 10px 14px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    margin-bottom: 0;
    /* Modern cross-platform monospace font stack optimized for URLs/paths */
    font-family: ui-monospace, SFMono-Regular, 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, 'Courier New', monospace;
    font-weight: 450;  /* Slightly lighter for better readability */
    color: var(--text-primary);
    font-size: 14px;
    letter-spacing: 0.01em;  /* Slight spacing for better character distinction */
    transition: all 0.2s ease;
}


.endpoint-card .endpoint-path-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
    /* Ensure text doesn't wrap */
    word-break: normal;
    /* Inherit improved font styling from parent */
    font-family: inherit;
    font-weight: inherit;
    letter-spacing: inherit;
}

/* ===== ENDPOINT COPY BUTTON ===== */
.endpoint-copy-btn {
    position: absolute;
    right: 28px;  /* Match card padding */
    top: 50%;
    transform: translateY(-50%);
    padding: 6px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    opacity: 0.6;
    z-index: 10;
}

.endpoint-copy-btn:hover {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
}

.endpoint-copy-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.endpoint-copy-btn:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 2px;
}

.endpoint-copy-btn .copy-icon {
    font-size: 16px;
    line-height: 1;
    display: inline-block;
    padding: 2px;
    transition: transform 0.2s ease;
}

.endpoint-copy-btn.copied .copy-icon {
    transform: scale(1.2);
}

.endpoint-copy-btn.copied {
    background: var(--accent-primary);
    color: white;
    border-color: var(--accent-primary);
    opacity: 1;
}

/* ===== DJANGO MODELS CARD LAYOUT ===== */
/* Models container */
.models-container {
    max-width: 100%;
    margin: 0 auto;
}

/* App description styling */
.app-description {
    font-size: 1rem;
    color: var(--md-default-fg-color--light);
    margin-bottom: 1.5rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--md-default-fg-color--lightest);
}

/* Model cards grid */
.model-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

/* Individual model card */
.model-card {
    background: var(--md-default-bg-color);
    border: 1px solid var(--md-default-fg-color--lightest);
    border-radius: 8px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.model-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
    border-color: var(--md-primary-fg-color);
}

.model-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--md-primary-fg-color), var(--md-accent-fg-color));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.model-card:hover::before {
    opacity: 1;
}

/* Model header */
.model-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.model-header h3 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.model-header h3 a {
    color: var(--md-default-fg-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.model-header h3 a:hover {
    color: var(--md-primary-fg-color);
}

/* Model badge */
.model-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--md-primary-fg-color);
    color: var(--md-primary-bg-color);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Animation for cards appearing */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.model-card {
    animation: fadeInUp 0.6s ease-out;
}

/* Stagger animation for multiple cards */
.model-card:nth-child(1) { animation-delay: 0.1s; }
.model-card:nth-child(2) { animation-delay: 0.2s; }
.model-card:nth-child(3) { animation-delay: 0.3s; }
.model-card:nth-child(4) { animation-delay: 0.4s; }
.model-card:nth-child(5) { animation-delay: 0.5s; }
.model-card:nth-child(6) { animation-delay: 0.6s; }

/* ===== EMPTY STATE ===== */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
    margin: 40px 0;
    animation: fadeInUp 0.5s ease-out;
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 24px;
    opacity: 0.6;
    animation: pulse 2s ease-in-out infinite;
}

.empty-state-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 12px 0;
}

.empty-state-message {
    font-size: 16px;
    color: var(--text-secondary);
    margin: 0 0 24px 0;
    max-width: 400px;
}

.empty-state-button {
    padding: 12px 24px;
    background: var(--accent-primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-normal);
    box-shadow: var(--shadow);
}

.empty-state-button:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.empty-state-button:active {
    transform: translateY(0);
}

.empty-state-button:focus-visible {
    outline: 2px solid var(--accent-primary);
    outline-offset: 3px;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.6;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}
