/**
 * Shadcn UI Component Styles (CSS-only implementation)
 * Replicates shadcn/ui design system for WordPress theme
 */

/* ==========================================================================
   BADGE COMPONENT
   ========================================================================== */

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    border-radius: var(--radius);
    transition: all 0.2s;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Badge Variants */
.badge-default,
.badge {
    background-color: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
}

.badge-secondary {
    background-color: hsl(var(--secondary));
    color: hsl(var(--secondary-foreground));
}

.badge-outline {
    border: 1px solid hsl(var(--border));
    background-color: transparent;
    color: hsl(var(--foreground));
}

.badge-destructive {
    background-color: hsl(0 84% 60%);
    color: white;
}

/* ==========================================================================
   BUTTON COMPONENT
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1;
    border-radius: var(--radius);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    white-space: nowrap;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Button Variants */
.btn-default,
.btn--primary {
    background-color: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    border-color: hsl(var(--primary));
}

.btn-default:hover,
.btn--primary:hover {
    background-color: hsl(var(--gaming-red-hover));
    color: hsl(var(--primary-foreground));
}

.btn-secondary {
    background-color: hsl(var(--secondary));
    color: hsl(var(--secondary-foreground));
}

.btn-secondary:hover {
    background-color: hsl(220 14% 90%);
    color: hsl(var(--secondary-foreground));
}

.btn-outline {
    background-color: transparent;
    border-color: hsl(var(--border));
    color: hsl(var(--foreground));
}

.btn-outline:hover {
    background-color: hsl(var(--secondary));
    color: hsl(var(--foreground));
}

.btn-ghost,
.btn--ghost {
    background-color: transparent;
    border-color: transparent;
    color: hsl(var(--muted-foreground));
}

.btn-ghost:hover,
.btn--ghost:hover {
    background-color: hsl(var(--secondary));
    color: hsl(var(--foreground));
}

.btn-destructive {
    background-color: hsl(0 84% 60%);
    color: white;
}

.btn-destructive:hover {
    background-color: hsl(0 84% 50%);
}

/* Button Sizes */
.btn-sm {
    padding: 0.5rem 0.875rem;
    font-size: 0.8125rem;
}

.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

.btn-icon {
    padding: 0.625rem;
    width: 2.5rem;
    height: 2.5rem;
}

.btn-icon-sm {
    padding: 0.5rem;
    width: 2rem;
    height: 2rem;
}

/* ==========================================================================
   INPUT COMPONENT
   ========================================================================== */

.input {
    display: flex;
    width: 100%;
    padding: 0.625rem 0.875rem;
    font-size: 0.875rem;
    line-height: 1.5;
    background-color: hsl(var(--background));
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    color: hsl(var(--foreground));
    transition: all 0.2s;
}

.input:focus {
    outline: none;
    border-color: hsl(var(--ring));
    box-shadow: 0 0 0 1px hsl(var(--ring));
}

.input:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.input::placeholder {
    color: hsl(var(--muted-foreground));
}

/* ==========================================================================
   CARD EFFECTS
   ========================================================================== */

.card-hover {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px -5px rgba(0, 0, 0, 0.1),
        0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.img-zoom {
    overflow: hidden;
}

.img-zoom img {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.img-zoom:hover img {
    transform: scale(1.05);
}

/* ==========================================================================
   SCORE BADGE
   ========================================================================== */

.score-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 3rem;
    height: 3rem;
    background-color: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 1.125rem;
}

/* ==========================================================================
   KEY TAKEAWAY COMPONENT
   ========================================================================== */

.key-takeaway {
    background-color: hsl(var(--accent));
    border-left: 4px solid hsl(var(--primary));
    padding: 1.5rem;
    border-radius: var(--radius);
    margin: 2rem 0;
}

.key-takeaway h4 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: hsl(var(--accent-foreground));
    margin-bottom: 1rem;
}

.key-takeaway ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.key-takeaway li {
    color: hsl(var(--muted-foreground));
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

/* ==========================================================================
   BREADCRUMBS
   ========================================================================== */

.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.breadcrumbs a {
    color: hsl(var(--muted-foreground));
    transition: color 0.2s;
}

.breadcrumbs a:hover {
    color: hsl(var(--primary));
}

.breadcrumbs-separator {
    color: hsl(var(--muted-foreground));
    opacity: 0.5;
}

/* ==========================================================================
   AUTHOR BOX
   ========================================================================== */

.author-box {
    display: flex;
    gap: 1.5rem;
    padding: 2rem;
    background-color: hsl(var(--secondary));
    border-radius: var(--radius);
    border: 1px solid hsl(var(--border));
}

.author-box__avatar {
    flex-shrink: 0;
}

.author-box__avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

.author-box__info {
    flex: 1;
}

.author-box__name {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
    color: hsl(var(--foreground));
}

.author-box__role {
    font-size: 0.875rem;
    color: hsl(var(--muted-foreground));
    margin-bottom: 0.75rem;
}

.author-box__bio {
    font-size: 0.9375rem;
    line-height: 1.6;
    color: hsl(var(--muted-foreground));
    margin-bottom: 1rem;
}

.author-box__social {
    display: flex;
    gap: 0.5rem;
}

/* ==========================================================================
   SHARE BUTTONS
   ========================================================================== */

.share-buttons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.share-buttons__label {
    font-weight: 600;
    font-size: 0.875rem;
    color: hsl(var(--foreground));
}

/* ==========================================================================
   PAGINATION
   ========================================================================== */

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.pagination-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    background-color: transparent;
    color: hsl(var(--foreground));
    cursor: pointer;
    transition: all 0.2s;
}

.pagination-button:hover:not(.pagination-button-disabled) {
    background-color: hsl(var(--secondary));
}

.pagination-button-active {
    background-color: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    border-color: hsl(var(--primary));
}

.pagination-button-disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-ellipsis {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    color: hsl(var(--muted-foreground));
}

/* ==========================================================================
   VIEW MODE TOGGLE
   ========================================================================== */

.view-toggle {
    display: flex;
    gap: 0.5rem;
}

.view-toggle__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    border: 1px solid hsl(var(--border));
    border-radius: var(--radius);
    background-color: transparent;
    color: hsl(var(--muted-foreground));
    cursor: pointer;
    transition: all 0.2s;
}

.view-toggle__button:hover {
    background-color: hsl(var(--secondary));
    color: hsl(var(--foreground));
}

.view-toggle__button-active {
    background-color: hsl(var(--primary));
    color: hsl(var(--primary-foreground));
    border-color: hsl(var(--primary));
}

/* ==========================================================================
   UTILITY CLASSES
   ========================================================================== */

.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */

/* Mobile First: Base styles above are mobile-optimized */

/* Small devices (landscape phones, 576px and up) */
@media (min-width: 576px) {
    .badge {
        font-size: 0.8125rem;
        padding: 0.3rem 0.75rem;
    }

    .btn {
        font-size: 0.9375rem;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 768px) {
    .author-box {
        flex-direction: row;
        align-items: flex-start;
    }

    .author-box__avatar img {
        width: 100px;
        height: 100px;
    }

    .breadcrumbs {
        font-size: 0.9375rem;
    }

    .key-takeaway {
        padding: 2rem;
    }

    .key-takeaway h4 {
        font-size: 1.125rem;
    }
}

/* Large devices (desktops, 1024px and up) */
@media (min-width: 1024px) {
    .author-box__name {
        font-size: 1.5rem;
    }

    .score-badge {
        width: 3.5rem;
        height: 3.5rem;
        font-size: 1.25rem;
    }
}

/* Mobile-specific overrides (max-width) */
@media (max-width: 767px) {
    .author-box {
        flex-direction: column;
        align-items: center;
        text-align: center;
        padding: 1.5rem;
    }

    .author-box__avatar {
        margin-bottom: 1rem;
    }

    .author-box__social {
        justify-content: center;
    }

    .share-buttons {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
    }

    .share-buttons__label {
        width: 100%;
        margin-bottom: 0.5rem;
    }

    .pagination {
        flex-wrap: wrap;
    }

    .pagination-button {
        min-width: 2rem;
        padding: 0 0.5rem;
        font-size: 0.8125rem;
    }

    .view-toggle {
        width: 100%;
        justify-content: center;
    }

    .breadcrumbs {
        font-size: 0.8125rem;
    }

    .key-takeaway {
        padding: 1.25rem;
        margin: 1.5rem 0;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }

    .btn-icon {
        width: 2.5rem;
    }
}

/* Extra small devices (portrait phones, less than 576px) */
@media (max-width: 575px) {
    .badge {
        font-size: 0.6875rem;
        padding: 0.2rem 0.5rem;
    }

    .btn-sm {
        padding: 0.4rem 0.75rem;
        font-size: 0.75rem;
    }

    .input {
        font-size: 16px;
        /* Prevent zoom on iOS */
    }
}