/* ==========================================================================
   HARDWARE ROWS - Clean Card Layout
   Modern design with subtle depth
   ========================================================================== */

/* Z-index management for dropdown stacking */
.hardware-section {
    position: relative;
    z-index: 1;
}

.hardware-section:has(.is-open) {
    z-index: 100;
}

/* GPU + CPU Row (2 columns) */
.hardware-row-dual {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(1rem, 2vw, 1.25rem);
}

@media (min-width: 640px) {
    .hardware-row-dual {
        grid-template-columns: 1fr 1fr;
    }
}

/* RAM + Resolution + Graphics Row (3 columns) */
.hardware-row-triple {
    display: grid;
    grid-template-columns: 1fr;
    gap: clamp(1rem, 2vw, 1.25rem);
}

@media (min-width: 480px) {
    .hardware-row-triple {
        grid-template-columns: 1fr 1fr;
    }
}

@media (min-width: 768px) {
    .hardware-row-triple {
        grid-template-columns: 1fr 1fr 1fr;
    }
}

/* Game-Specific Settings Row (dynamic, 2 columns) */
.hardware-row-dynamic {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(1rem, 2vw, 1.25rem);
}

@media (max-width: 479px) {
    .hardware-row-dynamic {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   HARDWARE SECTION - Clean Elevated Cards
   ========================================================================== */

.hardware-section {
    background: #222222;
    border: 1px solid #333333;
    border-radius: 12px;
    padding: clamp(1rem, 2.25vw, 1.5rem);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    touch-action: manipulation;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
    position: relative;
}

html.light .hardware-section {
    background: #ffffff;
    border-color: #e0e0e0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.hardware-section:hover {
    border-color: #404040;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.18);
}

html.light .hardware-section:hover {
    border-color: #c0c0c0;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.06);
}

.hardware-section--compact {
    padding: clamp(0.875rem, 1.75vw, 1.125rem);
}

/* Hardware Header */
.hardware-header {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: clamp(0.5rem, 1vw, 0.625rem);
    margin-bottom: clamp(0.75rem, 1.5vw, 1rem);
}

.hardware-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: clamp(0.8125rem, 1.3vw + 0.1rem, 0.9375rem);
    font-weight: 600;
    color: #ffffff;
}

html.light .hardware-label {
    color: #1a1a1a;
}

.hardware-label svg {
    color: #808080;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
}

.hardware-pills {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
}

/* ==========================================================================
   PILL BUTTONS - Clean toggle design
   ========================================================================== */

.pill-btn {
    padding: clamp(0.375rem, 0.75vw, 0.5rem) clamp(0.625rem, 1.25vw, 0.875rem);
    background: #2a2a2a;
    border: 1px solid #333333;
    border-radius: 6px;
    color: #b0b0b0;
    font-size: clamp(0.6875rem, 1vw, 0.75rem);
    font-weight: 500;
    text-decoration: none;
    transition: border-color 0.2s ease, color 0.2s ease, background-color 0.2s ease;
    cursor: pointer;
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    touch-action: manipulation;
}

html.light .pill-btn {
    background: #f5f5f5;
    border-color: #d0d0d0;
    color: #666666;
}

.pill-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: #2a2a2a;
}

html.light .pill-btn:hover {
    background: #f0f0f0;
}

.pill-btn:active {
    background: #333333;
}

html.light .pill-btn:active {
    background: #e8e8e8;
}

.pill-btn svg {
    width: 12px;
    height: 12px;
}

/* Link pill variant */
.pill-btn--link {
    background: transparent;
    border-color: transparent;
    color: #808080;
    font-weight: 500;
}

html.light .pill-btn--link {
    color: #666666;
}

.pill-btn--link:hover {
    background: #2a2a2a;
    border-color: #333333;
    color: #ffffff;
}

html.light .pill-btn--link:hover {
    background: #f0f0f0;
    border-color: #d0d0d0;
    color: #1a1a1a;
}

/* ==========================================================================
   HARDWARE ICON BADGES - Category indicators
   ========================================================================== */

.hardware-icon-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: #2a2a2a;
    border: 1px solid #333333;
    border-radius: 8px;
    color: #808080;
    margin-right: 0.5rem;
}

html.light .hardware-icon-badge {
    background: #f5f5f5;
    border-color: #e0e0e0;
    color: #666666;
}

.hardware-icon-badge svg {
    width: 16px;
    height: 16px;
}

/* ==========================================================================
   HARDWARE CONTENT - Dropdown container
   ========================================================================== */

.hardware-content {
    position: relative;
}

/* Optional hardware description text */
.hardware-description {
    font-size: clamp(0.6875rem, 1.1vw, 0.75rem);
    color: #808080;
    margin-top: 0.625rem;
    line-height: 1.5;
}

html.light .hardware-description {
    color: #666666;
}

/* ==========================================================================
   HARDWARE STATS - Quick info badges
   ========================================================================== */

.hardware-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.625rem;
}

.hardware-stat {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.5rem;
    background: #1e1e1e;
    border: 1px solid #2a2a2a;
    border-radius: 5px;
    font-size: 0.6875rem;
    color: #c0c0c0;
}

html.light .hardware-stat {
    background: #f5f5f5;
    border-color: #e0e0e0;
    color: #555555;
}

.hardware-stat__label {
    color: #808080;
}

html.light .hardware-stat__label {
    color: #888888;
}

.hardware-stat__value {
    color: #ffffff;
    font-weight: 600;
}

html.light .hardware-stat__value {
    color: #1a1a1a;
}

/* Status-based stat colors */
.hardware-stat--success {
    border-color: rgba(var(--success-rgb), 0.3);
    background: rgba(var(--success-rgb), 0.08);
}

.hardware-stat--success .hardware-stat__value {
    color: var(--success);
}

.hardware-stat--warning {
    border-color: rgba(var(--warning-rgb), 0.3);
    background: rgba(var(--warning-rgb), 0.08);
}

.hardware-stat--warning .hardware-stat__value {
    color: var(--warning);
}

.hardware-stat--error {
    border-color: rgba(var(--error-rgb), 0.3);
    background: rgba(var(--error-rgb), 0.08);
}

.hardware-stat--error .hardware-stat__value {
    color: var(--error);
}
