/* chemicals.css */
@import url('../calculators/solubility.css');

/* Custom overrides for Chemicals App */

/* NFPA Diamond Styling */
.nfpa-container,
.nfpa-wrapper {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nfpa-diamond {
    position: relative;
    width: 56px;
    height: 56px;
    transform: rotate(45deg);
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    border: 1px solid rgba(0, 0, 0, 0.2);
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.2);
}

.nfpa-quad {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Arial', sans-serif;
    font-weight: bold;
    font-size: 14px;
    color: #000;
}

.nfpa-quad span {
    transform: rotate(-45deg);
    display: block;
}

.nfpa-flammability {
    background-color: #EA4335;
}

.nfpa-instability {
    background-color: #FBBC05;
}

.nfpa-health {
    background-color: #4285F4;
}

.nfpa-special {
    background-color: #FFFFFF;
}

/* Properties Grid */
.props-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 4px;
    font-size: 0.8rem;
}

.prop-item {
    background: rgba(255, 255, 255, 0.05);
    padding: 6px 8px;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    cursor: help;
}

.prop-item:hover {
    background: rgba(255, 255, 255, 0.1);
}

.prop-label {
    color: var(--text-secondary);
    font-size: 0.75em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.prop-value {
    color: var(--text-primary);
    font-weight: 500;
}

.info-icon {
    display: inline-block;
    width: 12px;
    height: 12px;
    line-height: 12px;
    text-align: center;
    border-radius: 50%;
    background: var(--text-secondary);
    color: var(--bg-primary);
    font-size: 10px;
    margin-left: 4px;
    opacity: 0.5;
}

/* Compatibility Badges */
.comp-badge {
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
    margin-top: 1rem;
}

.comp-danger {
    background-color: rgba(244, 67, 54, 0.2);
    border: 1px solid #f44336;
    color: #ff8a80;
}

.comp-caution {
    background-color: rgba(255, 235, 59, 0.1);
    border: 1px solid #ffeb3b;
    color: #fff176;
}

.comp-safe {
    background-color: rgba(76, 175, 80, 0.2);
    border: 1px solid #4caf50;
    color: #a5d6a7;
}

/* Status Banner (Replaces Visualizer) */
.status-banner {
    padding: 12px;
    border-radius: 6px;
    text-align: center;
    margin-bottom: 12px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}

.status-banner h2 {
    margin: 0 0 4px 0;
    font-size: 1.2em;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.status-banner p {
    margin: 0;
    font-size: 0.9em;
    opacity: 0.9;
}

.status-safe {
    background: rgba(76, 175, 80, 0.15);
    border-color: #4caf50;
    color: #a5d6a7;
}

.status-caution {
    background: rgba(255, 193, 7, 0.15);
    border-color: #ffc107;
    color: #ffeb3b;
}

.status-danger {
    background: rgba(244, 67, 54, 0.15);
    border-color: #f44336;
    color: #ff8a80;
}

.status-critical {
    background: rgba(183, 28, 28, 0.25);
    border-color: #b71c1c;
    color: #ff5252;
    font-weight: bold;
    animation: pulse-danger 1s infinite;
}

@keyframes pulse-danger {
    0% {
        box-shadow: 0 0 0 0 rgba(244, 67, 54, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(244, 67, 54, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(244, 67, 54, 0);
    }
}