/* Kreditni kalkulator stilovi */
.kreditni-kalkulator-container {
    width: 100%; /* Puna širina kontejnera */
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Header */
.kalk-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    background: white;
    border-bottom: 1px solid #e9ecef;
}

.kalk-title {
    font-size: 20px;
    font-weight: 500;
    color: #333;
    margin: 0;
}

.kalk-result-badge {
    background: #ff6b35;
    border-radius: 20px;
    padding: 6px 12px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.result-text {
    color: white;
    font-size: 12px;
    font-weight: 400;
}

.result-amount {
    color: white;
    font-size: 14px;
    font-weight: 600;
}

/* Form Grid Layout - Desktop */
.kalk-form {
    padding: 30px;
}

.kalk-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
}

.kalk-left-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.kalk-right-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding-top: 35px; /* Offset za alignment sa kamata poljem */
}

.kalk-kamata-field {
    margin-top: -35px; /* Povuci kamata polje na vrh */
}

.kalk-field {
    position: relative;
}

.kalk-label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    margin-bottom: 5px;
    text-transform: none;
}

.kalk-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 0;
    height: 48px;
}

.kalk-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0 15px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    outline: none;
    height: 100%;
}

.kalk-input:read-only {
    cursor: default;
}

/* Controls za kamatu */
.kalk-controls {
    display: flex;
    flex-direction: column;
    padding: 3px;
    gap: 1px;
}

.kalk-btn-up,
.kalk-btn-down {
    background: #666;
    border: none;
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 2px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.kalk-btn-up:hover,
.kalk-btn-down:hover {
    background: #333;
}

/* Info icon */
.kalk-info-icon {
    background: #ccc;
    color: white;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    font-weight: bold;
    cursor: help;
    margin-right: 10px;
    flex-shrink: 0;
}

/* Sliders - Desktop layout */
.kalk-slider-field {
    height: 48px;
    display: flex;
    align-items: center;
}

.kalk-slider-wrapper {
    width: 100%;
    padding: 0 5px;
}

.kalk-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e9ecef;
    outline: none;
    -webkit-appearance: none;
    cursor: pointer;
}

.kalk-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #ff6b35;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.kalk-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #ff6b35;
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

/* Mobile slider wrapper - skriven na desktop */
.kalk-mobile-slider {
    display: none;
    margin-top: 10px;
    padding: 0 5px;
}

.kalk-mobile-slider .kalk-slider {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: #e9ecef;
    outline: none;
    -webkit-appearance: none;
    cursor: pointer;
}

/* Result field */
.kalk-result-field .kalk-input {
    font-size: 16px;
    font-weight: 700;
    color: #ff6b35;
}

/* Summary */
.kalk-summary {
    background: #f8f9fa;
    padding: 20px 30px;
    border-top: 1px solid #e9ecef;
}

.summary-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.summary-item {
    text-align: center;
}

.summary-label {
    font-size: 16px;
    font-weight: 600;
    color: #666;
    margin-bottom: 8px;
}

.summary-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: #000;
}

/* Disclaimer */
.kalk-disclaimer {
    padding: 20px 30px;
    background: #fff;
    border-top: 1px solid #e9ecef;
}

.kalk-disclaimer p {
    font-size: 12px;
    line-height: 1.5;
    color: #000;
    margin: 0;
    text-align: justify;
}

/* RESPONSIVE - TABLET (768px and below) */
@media (max-width: 768px) {
    .kalk-header {
        flex-direction: column;
        gap: 15px;
        padding: 20px;
        text-align: center;
    }

    .kalk-form {
        padding: 20px;
    }

    /* Tablet - još uvijek 2 kolone ali manje gap */
    .kalk-grid {
        gap: 20px;
    }

    .kalk-right-column {
        padding-top: 25px;
    }

    .kalk-kamata-field {
        margin-top: -25px;
    }

    .summary-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .kalk-disclaimer {
        padding: 15px 20px;
    }
}

/* MOBILE (600px and below) - NOVA LOGIKA */
@media (max-width: 600px) {
    /* Resetuj grid na mobile */
    .kalk-grid {
        display: block; /* Otkloni grid layout */
    }

    .kalk-left-column,
    .kalk-right-column {
        display: block;
        padding-top: 0;
    }

    .kalk-kamata-field {
        margin-top: 0;
    }

    /* Sakrij desktop slajdere na mobile */
    .kalk-slider-field {
        display: none;
    }

    /* Sakrij desktop kamata polje na mobile */
    .kalk-right-column .kalk-kamata-field {
        display: none;
    }

    /* Prikaži mobile kamata polje */
    .mobile-kamata-field {
        display: block !important;
    }

    /* Prikaži mobile slajdere */
    .kalk-mobile-slider {
        display: block;
    }

    /* Mobile layout za polja */
    .kalk-field {
        margin-bottom: 20px;
    }

    /* Za polja koja nemaju slider, ukloni bottom margin */
    .kalk-field.no-mobile-slider {
        margin-bottom: 20px;
    }

    .kalk-header {
        padding: 15px;
    }

    .kalk-form {
        padding: 15px;
    }

    .kalk-title {
        font-size: 18px;
    }

    .result-text {
        font-size: 11px;
    }

    .result-amount {
        font-size: 12px;
    }

    .kalk-result-badge {
        padding: 5px 10px;
    }

    .summary-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .summary-value {
        font-size: 1.5rem;
    }
}

/* EXTRA SMALL MOBILE (480px and below) */
@media (max-width: 480px) {
    .kalk-input {
        font-size: 13px;
        padding: 0 12px;
    }

    .kalk-input-wrapper {
        height: 44px;
    }

    .kalk-label {
        font-size: 11px;
    }
}
