/* Main Container */
.cinder-block-calculator {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

.cbc-container {
    display: flex;
    flex-direction: column;
}

/* Input Section */
.cbc-input-section {
    background: white;
    padding: 25px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.cbc-input-group {
    margin-bottom: 20px;
    position: relative;
}

.cbc-input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.cbc-input-group input,
.cbc-input-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.cbc-unit-label {
    position: absolute;
    right: 10px;
    top: 38px;
    color: #777;
}

.cbc-tooltip {
    display: inline-block;
    margin-left: 5px;
    width: 18px;
    height: 18px;
    background: #e0e0e0;
    border-radius: 50%;
    text-align: center;
    line-height: 18px;
    font-size: 12px;
    cursor: help;
    position: absolute;
    top: 38px;
    right: -25px;
}

.cbc-tooltiptext {
    visibility: hidden;
    width: 150px;
    background: #333;
    color: #fff;
    text-align: center;
    border-radius: 4px;
    padding: 5px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -75px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 12px;
}

.cbc-tooltip:hover .cbc-tooltiptext {
    visibility: visible;
    opacity: 1;
}

.cbc-button {
    background: #1a73e8;
    color: white;
    border: none;
    padding: 12px 20px;
    font-size: 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.3s;
    width: 100%;
}

.cbc-button:hover {
    background: #0d62c9;
}

/* Results Section */
.cbc-results-section {
    background: white;
    padding: 25px;
    border-radius: 8px;
    display: none;
}

.cbc-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.cbc-result-card {
    background: #f5f9ff;
    border: 1px solid #d0e3ff;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
}

.cbc-result-card h3 {
    margin: 0 0 10px;
    color: #1a73e8;
    font-size: 18px;
}

.cbc-result-value {
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

/* Diagram */
.cbc-diagram-container {
    margin-top: 20px;
}

#cbc-wall-diagram {
    display: grid;
    grid-template-columns: repeat(var(--cols, 5), 20px);
    grid-auto-rows: 20px;
    gap: 2px;
    margin-top: 15px;
}

.cbc-block {
    background: #1a73e8;
    border-radius: 2px;
    animation: fadeIn 0.5s ease-in-out;
    animation-fill-mode: both;
}

.cbc-diagram-warning {
    color: #d93025;
    font-weight: bold;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Responsive */
@media (max-width: 600px) {
    .cinder-block-calculator {
        padding: 15px;
    }
    
    .cbc-input-section,
    .cbc-results-section {
        padding: 15px;
    }
    
    .cbc-results-grid {
        grid-template-columns: 1fr;
    }
}