﻿.modal-content {
    position: relative;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
        -ms-flex-direction: column;
            flex-direction: column;
    width: 100%;
    color: var(--background-color);
    pointer-events: auto;
    background-color: var(--background-color);
    background-clip: padding-box;
    border: var(--bs-modal-border-width) solid var(--bs-modal-border-color);
    border-radius: var(--bs-modal-border-radius);
    outline: 0;
}

.modal-header {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-negative: 0;
        flex-shrink: 0;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    -webkit-box-pack: justify;
        -ms-flex-pack: justify;
            justify-content: space-between;
    padding: var(--bs-modal-header-padding);
    border-bottom: var(--background-color) solid var(--background-color);
    border-top-left-radius: var(--bs-modal-inner-border-radius);
    border-top-right-radius: var(--bs-modal-inner-border-radius);
}

.modal-footer {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-negative: 0;
        flex-shrink: 0;
    -ms-flex-wrap: wrap;
        flex-wrap: wrap;
    -webkit-box-align: center;
        -ms-flex-align: center;
            align-items: center;
    -webkit-box-pack: end;
        -ms-flex-pack: end;
            justify-content: flex-end;
    padding: calc(var(--bs-modal-padding) - var(--bs-modal-footer-gap) * .5);
    background-color: var(--bs-modal-footer-bg);
    border-top: var(--background-color) solid var(--background-color);
    border-bottom-right-radius: var(--bs-modal-inner-border-radius);
    border-bottom-left-radius: var(--bs-modal-inner-border-radius);
}

/* Dodatkowy padding w modalach warunków pożyczki */
.loan-conditions-modal .modal-body {
    padding: 2rem; /* lub dowolna wartość, która zapewni odpowiedni odstęp */
}

/* ========= Zmodyfikowany przycisk zamykania modal ========= */
.modal-header .btn-close {
    width: 1.25rem; /* zmniejszony rozmiar */
    height: 1.25rem; /* zmniejszony rozmiar */
    padding: 0.25rem; /* dodane niewielkie wypełnienie */
    margin: 0; /* usunięcie ewentualnych marginesów */
    background-color: transparent;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    border: none;
    opacity: 1;
    cursor: pointer;
    /* Domyślna (tryb ciemny) – biała ikona */
    background-image: url("data:image/svg+xml,%3Csvg%20viewBox%3D%220%200%201024%201024%22%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20fill%3D%22%23ffffff%22%3E%3Cg%20id%3D%22SVGRepo_bgCarrier%22%20stroke-width%3D%220%22%3E%3C/g%3E%3Cg%20id%3D%22SVGRepo_tracerCarrier%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3C/g%3E%3Cg%20id%3D%22SVGRepo_iconCarrier%22%3E%3Cpath%20fill%3D%22%23ffffff%22%20d%3D%22M195.2%20195.2a64%2064%200%200%201%2090.496%200L512%20421.504%20738.304%20195.2a64%2064%200%200%201%2090.496%2090.496L602.496%20512%20828.8%20738.304a64%2064%200%200%201-90.496%2090.496L512%20602.496%20285.696%20828.8a64%2064%200%200%201-90.496-90.496L421.504%20512%20195.2%20285.696a64%2064%200%200%201%200-90.496z%22%3E%3C/path%3E%3C/g%3E%3C/svg%3E");
}

.modal-header .btn-close:hover {
    opacity: 0.8;
}

/* Analogicznie dla trybu jasnego – czarna ikona */
.light-mode .modal-header .btn-close {
    background-image: url("data:image/svg+xml,%3Csvg%20viewBox%3D%220%200%201024%201024%22%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20fill%3D%22%23000000%22%3E%3Cg%20id%3D%22SVGRepo_bgCarrier%22%20stroke-width%3D%220%22%3E%3C/g%3E%3Cg%20id%3D%22SVGRepo_tracerCarrier%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3C/g%3E%3Cg%20id%3D%22SVGRepo_iconCarrier%22%3E%3Cpath%20fill%3D%22%23000000%22%20d%3D%22M195.2%20195.2a64%2064%200%200%201%2090.496%200L512%20421.504%20738.304%20195.2a64%2064%200%200%201%2090.496%2090.496L602.496%20512%20828.8%20738.304a64%2064%200%200%201-90.496%2090.496L512%20602.496%20285.696%20828.8a64%2064%200%200%201-90.496-90.496L421.504%20512%20195.2%20285.696a64%2064%200%200%201%200-90.496z%22%3E%3C/path%3E%3C/g%3E%3C/svg%3E");
}