/* Monocle-Inspired Style System */

/* Base Styles */
body {
    background-color: #F5F5F5; /* Crisp White */
    font-family: 'EB Garamond', 'Georgia', 'Times New Roman', serif; /* Serif body text */
    color: #101820; /* Rich Black */
    line-height: 1.7; /* Generous leading */
    font-size: 0.9rem; /* 9-10pt body text */
}

.container-fluid {
    max-width: 1400px;
    margin: 0 auto;
    padding-left: 3%;
    padding-right: 3%;
}

@media (max-width: 768px) {
    .container-fluid {
        padding-left: 3%;
        padding-right: 3%;
    }
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Libre Franklin', 'Helvetica Neue', Arial, sans-serif; /* Sans-serif for headings */
    font-weight: 500;
    letter-spacing: -0.01em;
    line-height: 1.3;
    color: #101820; /* Rich Black */
}

h1 {
    font-size: 1.8rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin-bottom: 0.5rem;
}

header p {
    font-family: 'EB Garamond', 'Georgia', 'Times New Roman', serif;
    font-size: 1rem;
    letter-spacing: 0.02em;
    color: #8A9B9F; /* Cool Gray */
}

.card {
    box-shadow: none;
    border: 1px solid rgba(16, 24, 32, 0.1);
    border-radius: 0;
    margin-bottom: 2.5rem;
    transition: all 0.3s ease;
}

.card:hover {
    border-color: rgba(16, 24, 32, 0.2);
}

.card-header {
    background-color: #F5F5F5;
    border-bottom: 1px solid rgba(16, 24, 32, 0.1);
    padding: 1.5rem 1.5rem 1.25rem;
}

.card-header h5 {
    margin: 0;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.9rem;
    color: #101820; /* Rich Black */
}

/* Card Body */
.card-body {
    padding: 1.25rem;
}

/* Quick preset buttons */
.preset-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.preset-btn {
    flex: 1;
    padding: 0.75rem 1rem;
    background-color: #F5F5F5;
    border: 1px solid #101820; /* Rich Black */
    border-radius: 0;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-weight: 500;
    font-size: 0.8rem;
    color: #101820; /* Rich Black */
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.preset-btn:hover {
    background-color: #E8E4D9; /* Soft Beige */
}

.preset-btn.active {
    background-color: #101820; /* Rich Black */
    color: #F5F5F5; /* Crisp White */
    border-color: #101820; /* Rich Black */
}

/* Form Styling */
.form-control:read-only {
    background-color: #E8E4D9; /* Soft Beige */
}

.form-label {
    font-family: 'Libre Franklin', 'Helvetica Neue', Arial, sans-serif;
    font-weight: 500;
    font-size: 0.68rem;
    color: #101820; /* Rich Black */
    display: block;
    margin-bottom: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: normal; /* Allow text to wrap */
    line-height: 1.2;
    min-height: 1.2rem; /* Consistent height */
}

/* Form Select Styling */
.form-select {
    background-color: #F5F5F5; /* Crisp White */
    color: #101820; /* Rich Black */
    border: 1px solid #101820; /* Rich Black */
    border-radius: 0;
    padding: 0.5rem 1rem;
    box-shadow: none;
    font-weight: normal;
    font-family: 'Georgia', 'Times New Roman', serif;
    height: 42px;
}

.form-select:focus {
    box-shadow: none;
    border-color: #C8102E; /* Monocle Red */
    color: #101820; /* Rich Black */
    background-color: #F5F5F5; /* Crisp White */
}

.form-select option {
    background-color: #F5F5F5; /* Crisp White */
    color: #101820; /* Rich Black */
}

input[type="number"], input[type="text"] {
    text-align: right;
    height: 38px;
    font-family: 'EB Garamond', 'Georgia', 'Times New Roman', serif;
    font-size: 0.95rem;
}

/* Styling for investment input fields */
.investment-input {
    width: 100%;
    font-size: 0.95rem;
    text-align: right;
    padding-right: 0.5rem;
    letter-spacing: 0.01em;
}

.form-control, .form-select {
    border: 1px solid rgba(16, 24, 32, 0.3); /* Rich Black with transparency */
    box-shadow: none;
    height: 38px; /* Slightly smaller height */
    background-color: #F5F5F5; /* Crisp White */
}

.form-control:focus {
    border-color: #C8102E; /* Monocle Red */
    box-shadow: none;
}

.form-check-label {
    cursor: pointer;
    font-family: 'Georgia', 'Times New Roman', serif;
}

/* Grid Layout for Building Data */
.building-data-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem; /* Reduced gap for a more compact layout */
    margin-bottom: 1rem;
}

/* Reduction percentage styling */
.reduction-percentage {
    font-size: 0.8rem;
    color: #34D399; /* Green color */
    font-weight: 500;
    display: inline-block;
    margin-top: 0.2rem;
}

/* Align form inputs */
.building-data-grid .mb-3 {
    display: flex;
    flex-direction: column;
    min-width: 0; /* Prevents flex items from overflowing */
}

.building-data-grid .form-label {
    margin-bottom: 0.3rem;
    min-height: 1.2rem; /* Consistent height for all labels */
    white-space: normal; /* Allow text to wrap if needed */
    line-height: 1.2;
    font-size: 0.68rem; /* Slightly smaller font size to accommodate more text */
}

.building-data-grid .form-control, 
.building-data-grid .form-select {
    width: 100%;
    min-width: 0; /* Prevents overflow */
    margin-top: 0.3rem; /* Consistent spacing from label */
}

/* Results Grid Boxes */
.result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem; /* Reduced gap for a more compact layout */
    margin: 0.5rem 0 1.5rem;
}

.result-box {
    background-color: #F5F5F5; /* Crisp White */
    color: #101820; /* Rich Black */
    padding: 1.25rem;
    border-radius: 0;
    box-shadow: none;
    border: 1px solid rgba(16, 24, 32, 0.15);
}

.result-box .label {
    font-family: 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.result-box .value {
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 1.5rem;
    font-weight: normal;
}

/* Intervention Table */
.intervention-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 1rem 0 2rem;
    font-family: 'Georgia', 'Times New Roman', serif;
}

.intervention-table th,
.intervention-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #D6CCB1; /* Warm Tan */
    vertical-align: middle;
}

.intervention-table th {
    background-color: #F5F5F5; /* Crisp White */
    font-family: 'Libre Franklin', 'Helvetica Neue', Arial, sans-serif;
    font-weight: 500;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.75rem;
}

/* Styling for the "Pilihan" column */
.intervention-table th:first-child {
    background-color: #C8102E; /* Monocle Red */
    color: #F5F5F5; /* Crisp White */
    width: 60px; /* More compact column width */
}

.intervention-table td:first-child {
    background-color: #C8102E; /* Monocle Red */
    text-align: center;
    width: 60px; /* More compact column width */
}

/* Improve checkbox visibility on red background */
.intervention-table td:first-child .form-check-input {
    border: 2px solid #F5F5F5; /* Crisp White */
    background-color: #F5F5F5; /* Crisp White */
    width: 18px;
    height: 18px;
}

.intervention-table td:first-child .form-check-input:checked {
    background-color: #F5F5F5; /* Crisp White */
    border-color: #F5F5F5; /* Crisp White */
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3e%3cpath fill='%23C8102E' d='M14.83 4.89l1.34.94-5.81 8.38H9.02L5.78 9.67l1.34-1.25 2.57 2.4z'/%3e%3c/svg%3e");
}

.intervention-table tr:hover > td:not(:first-child) {
    background-color: #E8E4D9; /* Soft Beige */
}

/* Chart Styles */
canvas {
    width: 100% !important;
    height: 450px !important;
}

.chart-container {
    background: #F5F5F5; /* Crisp White */
    padding: 2.5rem;
    border: 1px solid #101820; /* Rich Black */
    border-radius: 0;
    box-shadow: none;
    margin-top: 2rem;
}

/* Savings Highlight */
.savings-highlight {
    background-color: #F5F5F5; /* Crisp White */
    border: 1px solid rgba(16, 24, 32, 0.15); /* Light border */
    border-left: 4px solid #C8102E; /* Monocle Red */
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.highlight-content {
    font-family: 'EB Garamond', 'Georgia', 'Times New Roman', serif;
}

.highlight-title {
    font-family: 'Libre Franklin', 'Helvetica Neue', Arial, sans-serif;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.75rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
    color: #101820; /* Rich Black */
}

.highlight-metrics {
    display: flex;
    gap: 2rem;
    margin-top: 1rem;
}

.metric {
    display: flex;
    flex-direction: column;
}

.metric-value {
    font-size: 2rem;
    font-weight: 500;
    line-height: 1.1;
    color: #C8102E; /* Monocle Red */
    font-family: 'EB Garamond', 'Georgia', 'Times New Roman', serif;
}

/* Special styling for tree metric */
#treesEquivalent {
    color: #34D399; /* Green color */
}

.metric-label {
    font-size: 0.8rem;
    color: #101820; /* Rich Black */
    opacity: 0.7;
}

