html {
    font-size: 11px;
    position: relative;
    min-height: 100%;
}

@media (min-width: 768px) {
    html {
        font-size: 12px;
    }
}

body {
    margin-bottom: 60px;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/**/

/* === Genel reset & yatay taşmayı engelle === */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Konteyner tam genişlik */
.container-fluid {
    background-color: white;
    max-width: 100%;
}

/* === Panel görünümü === */
.panel {
    border: 1px solid #dee2e6;
    border-radius: .5rem;
    margin-bottom: 1rem;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

    .panel .hd {
        font-weight: 600;
        background: #f8f9fa;
        border-bottom: 1px solid #dee2e6;
        padding: .3rem .65rem;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .panel .bd {
        padding: .75rem;
        flex: 1 1 auto;
        min-height: 0;
    }

/* Yardımcılar */
.nowrap {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}

/* Grid yardımcıları */
.grid-1 {
    display: grid;
    grid-template-columns: 1fr;
    gap: .5rem;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .5rem;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: .5rem;
}

.grid-6 {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: .5rem;
}

.sublabel-single {
    font-size: 1rem;
    font-weight: bold;
    color: #000000;
    margin-bottom: .25rem;
}

.sublabel {
    font-size: .9rem;
    color: #6c757d;
    margin-bottom: .25rem;
}

#inputs input.form-control {
    text-align: right;
    font-variant-numeric: tabular-nums;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calc-btn {
    height: 100%;
    font-weight: 700;
}

.row.g-3 > [class*="col-"],
.row.g-2 > [class*="col-"],
.row.g-0 > [class*="col-"] {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

    .row.g-3 > [class*="col-"] > .panel,
    .row.g-2 > [class*="col-"] > .panel,
    .row.g-0 > [class*="col-"] > .panel {
        height: 100%;
        width: 100%;
    }

.row.g-3 .row.g-3 > [class*="col-"] {
    display: flex;
    flex-direction: column;
}

@media (max-width: 991.98px) {
    .panel .bd {
        padding: .5rem;
    }
}

.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}


/*Top Bar*/

body {
    margin: 0;
    font-family: Arial, sans-serif;
}

.input-bar {
    width: 100%;
    height: 60px;
    background: #6c757d;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-left: 15px;
    padding-right: 15px;
}

.input-bar-left {
    display: flex;
    gap: 10px;
}

.input-bar-right {
    display: flex;
}


.circle-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    outline: none;
    background: #444;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

    .circle-btn:hover {
        background: #1F5CAC;
        transform: translateY(-1px);
        box-shadow: 0 2px 6px rgba(0,0,0,0.35);
    }

    .circle-btn:active {
        transform: translateY(0);
        box-shadow: none;
    }

.content {
    max-width: 800px;
    margin: 0 auto;
    padding: 16px;
}

.input-field-helper-diagram-wrapper {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.input-field-helper-diagram {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/**/

#inputFieldHelperDiagramContainer {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 100px);
    min-height: 300px;
}

    #inputFieldHelperDiagramContainer .top-pane {
        flex: 0 0 45%;
        display: flex;
        flex-direction: column;
        overflow: hidden;
    }

    #inputFieldHelperDiagramContainer .bottom-pane {
        flex: 0 0 55%;
        overflow: hidden;
    }


.top-pane .tab-content {
    flex: 1 1 auto;
    min-height: 0;
}

.top-pane .tab-pane {
    height: 100%;
}

/**/

.tooltip-wide .tooltip-inner {
    text-align: left !important;
    max-width: 400px !important;
    white-space: normal !important;
    padding: 8px;
}

    .tooltip-wide .tooltip-inner img.tooltip-img {
        width: 150px;
        height: auto;
    }


/* Modal */
#loadingModal .modal-dialog {
    transform: none !important;
    transition: none !important;
}

#loadingModal.fade .modal-dialog {
    opacity: 0;
    transform: scale(0.98) !important;
    transition: opacity .15s linear, transform .15s ease-in-out !important;
}

#loadingModal.show .modal-dialog {
    opacity: 1;
    transform: scale(1) !important;
}

#loadingModal .modal-content {
    border-radius: 14px;
}