/* ============================================
   Hesapbelli İnşaat Maliyet Hesaplayıcı v3.0
   Modern, responsive, yenilikçi tasarım
   ============================================ */

#hbc-v2-calculator-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
}

#hbc-v2-calculator-form h2 {
    color: #1a1a2e;
    font-size: 1.6em;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid #e94560;
}

/* Form Rows */
.hbc-v2-form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.hbc-v2-form-group {
    flex: 1;
}

.hbc-v2-form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 6px;
    color: #333;
    font-size: 0.95em;
}

.hbc-v2-form-group select,
.hbc-v2-form-group input[type="number"] {
    width: 100%;
    padding: 12px 14px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
    transition: border-color 0.3s, box-shadow 0.3s;
    background: #fff;
    box-sizing: border-box;
}

.hbc-v2-form-group select:focus,
.hbc-v2-form-group input[type="number"]:focus {
    border-color: #e94560;
    box-shadow: 0 0 0 3px rgba(233, 69, 96, 0.15);
    outline: none;
}

.hbc-v2-form-group small {
    display: block;
    margin-top: 4px;
    color: #888;
    font-size: 0.85em;
}

/* Yapım Yöntemi Bilgi Kutusu */
.hbc-v2-info-box {
    background: linear-gradient(135deg, #f0f9ff 0%, #e8f5e9 100%);
    border: 2px solid #4caf50;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.15);
}

.hbc-v2-info-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    font-size: 1.15em;
}

.hbc-v2-info-icon {
    font-size: 1.5em;
}

.hbc-v2-info-box p {
    color: #444;
    line-height: 1.6;
    margin-bottom: 10px;
}

.hbc-v2-info-components {
    background: rgba(255,255,255,0.7);
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 0.95em;
}

.hbc-v2-info-advantages ul {
    list-style: none;
    padding: 0;
    margin: 8px 0 0 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.hbc-v2-info-advantages li {
    font-size: 0.9em;
    color: #2e7d32;
    padding: 4px 0;
}

/* Hesapla Butonu */
#hbc-v2-calculate-button {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #e94560 0%, #c62828 100%);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-size: 1.15em;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 10px;
}

#hbc-v2-calculate-button:hover {
    background: linear-gradient(135deg, #c62828 0%, #b71c1c 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(233, 69, 96, 0.4);
}

#hbc-v2-calculate-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Loading Spinner */
.hbc-v2-loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #e94560;
    border-radius: 50%;
    animation: hbc-spin 0.8s linear infinite;
    margin: 30px auto;
}

@keyframes hbc-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Sonuçlar */
#hbc-v2-results {
    margin-top: 30px;
}

.hbc-v2-result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.hbc-v2-result-header h3 {
    color: #1a1a2e;
    font-size: 1.4em;
    margin: 0;
}

.hbc-v2-result-badge {
    background: linear-gradient(135deg, #e94560, #c62828);
    color: #fff;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
}

/* Sonuç Grid */
.hbc-v2-result-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.hbc-v2-result-card {
    background: #fff;
    border: 2px solid #eee;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
}

.hbc-v2-result-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

.hbc-v2-result-total {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    border: none;
    color: #fff;
}

.hbc-v2-result-label {
    font-size: 0.9em;
    color: #888;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.hbc-v2-result-total .hbc-v2-result-label {
    color: rgba(255,255,255,0.7);
}

.hbc-v2-result-value {
    font-size: 1.4em;
    font-weight: 700;
    color: #1a1a2e;
}

.hbc-v2-result-value-big {
    font-size: 2em;
    font-weight: 800;
    color: #e94560;
}

/* Detay Bilgileri */
.hbc-v2-result-details {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.hbc-v2-detail-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.hbc-v2-detail-row:last-child {
    border-bottom: none;
}

.hbc-v2-detail-row span {
    color: #666;
}

.hbc-v2-detail-row strong {
    color: #1a1a2e;
}

/* Karşılaştırma */
.hbc-v2-comparison {
    background: linear-gradient(135deg, #fff3e0 0%, #fce4ec 100%);
    border: 2px solid #ff9800;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.hbc-v2-comparison h4 {
    color: #e65100;
    margin: 0 0 15px 0;
    font-size: 1.15em;
}

.hbc-v2-comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.hbc-v2-comp-item {
    background: rgba(255,255,255,0.8);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
}

.hbc-v2-comp-label {
    font-size: 0.85em;
    color: #666;
    margin-bottom: 6px;
}

.hbc-v2-comp-value {
    font-size: 1.2em;
    font-weight: 700;
    color: #1a1a2e;
}

.hbc-v2-comp-savings {
    grid-column: 1 / -1;
    background: #4caf50;
    color: #fff;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    font-size: 1.05em;
}

.hbc-v2-time-comparison {
    margin-top: 12px;
    padding: 10px 14px;
    background: rgba(255,255,255,0.8);
    border-radius: 8px;
    font-size: 0.95em;
    color: #555;
}

/* Anahtar Teslim Badge */
.hbc-v2-anahtar-teslim-badge {
    background: linear-gradient(135deg, #2e7d32 0%, #1b5e20 100%);
    color: #fff;
    padding: 12px 20px;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 20px;
    font-size: 0.95em;
    letter-spacing: 0.5px;
}

/* Kalem Bazlı Maliyet Dağılımı */
.hbc-v2-breakdown-section {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 20px;
}

.hbc-v2-breakdown-section h4 {
    color: #1a1a2e;
    margin: 0 0 15px 0;
    font-size: 1.15em;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.hbc-v2-breakdown-table {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hbc-v2-breakdown-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    background: #f8f9fa;
    border-radius: 8px;
    transition: background 0.2s;
}

.hbc-v2-breakdown-row:hover {
    background: #e8f5e9;
}

.hbc-v2-breakdown-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    color: #333;
}

.hbc-v2-breakdown-icon {
    font-size: 1.3em;
    width: 30px;
    text-align: center;
}

.hbc-v2-breakdown-amount {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hbc-v2-breakdown-value {
    font-weight: 700;
    color: #1a1a2e;
    font-size: 1.05em;
}

.hbc-v2-breakdown-percent {
    color: #888;
    font-size: 0.85em;
    font-weight: 400;
}

.hbc-v2-breakdown-bar-container {
    height: 4px;
    background: #e0e0e0;
    border-radius: 4px;
    margin: 0 14px 4px 14px;
    overflow: hidden;
}

.hbc-v2-breakdown-bar {
    height: 100%;
    background: linear-gradient(135deg, #e94560 0%, #c62828 100%);
    border-radius: 4px;
    transition: width 0.8s ease;
}

/* Toplam Kart Sub Text */
.hbc-v2-result-sub {
    font-size: 0.9em;
    margin-top: 8px;
    opacity: 0.8;
}

.hbc-v2-result-total .hbc-v2-result-sub {
    color: rgba(255,255,255,0.7);
}

/* Karşılaştırma VS */
.hbc-v2-comp-vs {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 1.2em;
    color: #e94560;
    display: none;
}

.hbc-v2-comp-betonarme {
    border-left: 4px solid #ff9800;
}

.hbc-v2-comp-alternative {
    border-left: 4px solid #4caf50;
}

.hbc-v2-comp-sqm {
    font-size: 0.85em;
    color: #888;
    margin-top: 4px;
}

/* Uyarı */
.hbc-v2-disclaimer {
    background: #fff8e1;
    border: 1px solid #ffd54f;
    border-radius: 8px;
    padding: 12px 16px;
    margin-top: 15px;
}

.hbc-v2-disclaimer small {
    color: #795548;
    line-height: 1.5;
}

/* Hata Mesajı */
#hbc-v2-results-error {
    background: #ffebee;
    color: #c62828;
    padding: 15px 20px;
    border-radius: 10px;
    border: 1px solid #ef9a9a;
    font-weight: 500;
    text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
    #hbc-v2-calculator-wrapper {
        padding: 10px;
    }
    
    .hbc-v2-form-row {
        flex-direction: column;
        gap: 12px;
    }
    
    .hbc-v2-result-grid {
        grid-template-columns: 1fr;
    }
    
    .hbc-v2-result-total {
        grid-column: 1;
    }
    
    .hbc-v2-comparison-grid {
        grid-template-columns: 1fr;
    }
    
    .hbc-v2-comp-savings {
        grid-column: 1;
    }
    
    .hbc-v2-result-value-big {
        font-size: 1.6em;
    }
    
    .hbc-v2-result-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .hbc-v2-info-advantages ul {
        grid-template-columns: 1fr;
    }
    
    .hbc-v2-time-comparison {
        font-size: 0.85em;
    }
    
    .hbc-v2-breakdown-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    
    .hbc-v2-breakdown-amount {
        width: 100%;
        justify-content: flex-end;
    }
    
    .hbc-v2-comp-vs {
        display: none;
    }
    
    .hbc-v2-anahtar-teslim-badge {
        font-size: 0.85em;
        padding: 10px 14px;
    }
}

@media (max-width: 480px) {
    .hbc-v2-result-value-big {
        font-size: 1.3em;
    }
    
    .hbc-v2-result-value {
        font-size: 1.1em;
    }
    
    #hbc-v2-calculator-form h2 {
        font-size: 1.3em;
    }
}
