/* Home Assistant Dashboard Styles */

.ha-category-section {
    margin-bottom: 2.5rem;
}

.ha-category-title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--neon-cyan);
    font-family: 'Orbitron', sans-serif;
    font-size: 1.1rem;
    letter-spacing: 1px;
    margin-bottom: 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgba(0, 255, 249, 0.2);
}

.sensor-card {
    cursor: pointer;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.sensor-card:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: var(--neon-cyan);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0, 255, 249, 0.1);
}

.sensor-icon-link {
    text-decoration: none;
    display: flex;
    justify-content: center;
    align-items: center;
}

.sensor-card-mini {
    position: relative;
    width: 100%;
    min-height: 50px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 0.5rem 0.75rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.sensor-mini-info {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin-right: 1.5rem;
    /* Space for the state dot */
}

.sensor-mini-name {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sensor-mini-value {
    font-size: 0.85rem;
    font-family: 'JetBrains Mono', monospace;
    font-weight: 500;
}

.sensor-icon-link:hover .sensor-card-mini {
    background: rgba(255, 255, 255, 0.08);
    transform: perspective(500px) translateZ(10px);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
    border-color: var(--neon-cyan);
}

.sensor-mini-state {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    box-shadow: 0 0 5px currentColor;
}

.sensor-icon {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-right: 1rem;
}

.sensor-name {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sensor-state {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--neon-cyan);
}

.sensor-unit {
    font-size: 0.8rem;
    opacity: 0.6;
    margin-left: 2px;
}

/* Detail Modal */
#ha-detail-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.ha-modal-content {
    background: var(--bg-main);
    border: 2px solid var(--neon-cyan);
    border-radius: var(--radius-lg);
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    padding: 2rem;
    position: relative;
    overflow-y: auto;
    box-shadow: 0 0 50px rgba(0, 255, 249, 0.2);
}

.ha-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    font-size: 1.5rem;
    color: var(--neon-magenta);
    cursor: pointer;
    background: none;
    border: none;
}

.ha-attr-table {
    width: 100%;
    margin-top: 1.5rem;
    border-collapse: collapse;
}

.ha-attr-table tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.ha-attr-table td {
    padding: 0.75rem 0;
}

.ha-attr-label {
    font-weight: 600;
    color: var(--text-secondary);
    width: 40%;
}

.ha-attr-value {
    color: var(--text-primary);
    word-break: break-all;
}