/**
 * Hesaplama Merkezi - Izole CSS
 * Tum stiller .hm-calc- prefix ile izole
 */

/* ==================== WRAPPER ==================== */
.hm-calc-wrapper {
    max-width: 600px;
    margin: 20px auto;
    padding: 25px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
}

/* ==================== HEADER ==================== */
.hm-calc-header {
    text-align: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.hm-calc-header h3 {
    margin: 0;
    color: #333;
    font-size: 20px;
}

/* ==================== BODY ==================== */
.hm-calc-body {
    margin-bottom: 15px;
}

/* ==================== ROW & COL ==================== */
.hm-calc-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px 15px -10px;
}

.hm-calc-row:last-child {
    margin-bottom: 0;
}

.hm-calc-col {
    flex: 1;
    min-width: 200px;
    padding: 0 10px;
    box-sizing: border-box;
}

.hm-calc-col-full {
    flex: 0 0 100%;
}

/* ==================== FORM ELEMENTS ==================== */
.hm-calc-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #444;
    font-size: 14px;
}

.hm-calc-input,
.hm-calc-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 16px;
    background: #fff;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.hm-calc-input:focus,
.hm-calc-select:focus {
    outline: none;
    border-color: #2271b1;
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.2);
}

.hm-calc-input[type="number"] {
    -moz-appearance: textfield;
}

.hm-calc-input[type="number"]::-webkit-outer-spin-button,
.hm-calc-input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* ==================== FOOTER ==================== */
.hm-calc-footer {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

/* ==================== BUTTONS ==================== */
.hm-calc-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

.hm-calc-btn:active {
    transform: scale(0.98);
}

.hm-calc-btn-primary {
    background: #2271b1;
    color: #fff;
}

.hm-calc-btn-primary:hover {
    background: #135e96;
}

.hm-calc-btn-reset {
    background: #f0f0f0;
    color: #333;
}

.hm-calc-btn-reset:hover {
    background: #e0e0e0;
}

/* ==================== RESULT BOX ==================== */
.hm-calc-result {
    margin-top: 20px;
    padding: 15px;
    background: #f0f9ff;
    border: 1px solid #b3e0ff;
    border-radius: 5px;
    display: none;
}

.hm-calc-result p {
    margin: 0 0 10px 0;
}

.hm-calc-result p:last-child {
    margin-bottom: 0;
}

/* ==================== ERROR BOX ==================== */
.hm-calc-error {
    margin-top: 15px;
    padding: 12px 15px;
    background: #fff2f2;
    border: 1px solid #ffcccc;
    border-radius: 5px;
    color: #cc0000;
    font-size: 14px;
    display: none;
}

/* ==================== RESULT STYLES ==================== */
.hm-result-title {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
}

.hm-result-title:first-child {
    margin-top: 0;
}

.hm-highlight {
    color: #2271b1;
    font-weight: 700;
}

.hm-error-text {
    color: #cc0000;
    font-weight: 600;
}

/* ==================== TABLE ==================== */
.hm-table-wrapper {
    overflow-x: auto;
    margin: 15px 0;
}

.hm-result-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.hm-result-table th,
.hm-result-table td {
    padding: 10px 8px;
    text-align: center;
    border: 1px solid #ddd;
}

.hm-result-table th {
    background: #f5f5f5;
    font-weight: 600;
    color: #333;
}

.hm-result-table tbody tr:nth-child(even) {
    background: #fafafa;
}

.hm-result-table tbody tr:hover {
    background: #f0f7ff;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 480px) {
    .hm-calc-wrapper {
        margin: 10px;
        padding: 15px;
    }
    
    .hm-calc-col {
        min-width: 100%;
        margin-bottom: 10px;
    }
    
    .hm-calc-footer {
        flex-direction: column;
    }
    
    .hm-calc-btn {
        width: 100%;
    }
    
    .hm-result-table {
        font-size: 12px;
    }
    
    .hm-result-table th,
    .hm-result-table td {
        padding: 6px 4px;
    }
}
