/*
 * BCS Modal — FancyBox drop-in replacement CSS
 * Uses same #fancybox-* IDs for full backward compatibility
 */

#fancybox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow-y: auto;
    /* z-index: sayfadaki .dropdown (9999), bootstrap-multiselect (99999), phone/borclu panel (~99998-100001)
       gibi UI elemanlarının ÜSTÜNDE kalmalı; jquery.confirm (100000+) ALTINDA kalmalı. */
    z-index: 99995;
    display: none;
    justify-content: center;
    padding: 40px;
}

#fancybox-wrap {
    position: relative;
    margin: auto;
    z-index: 99996;
    outline: none;
    display: none;
    /*min-width: 672px;*/
    max-width: calc(100vw - 80px);
}

#fancybox-outer {
    position: relative;
    background: var(--bcs-white);
    border-radius: 4px;
    box-shadow: 0 5px 40px rgba(0,0,0,.35);
}

#fancybox-content {
    position: relative;
    padding: 0;
    outline: none;
    z-index: 99997;
}

#fancybox-close {
    display: none;
}

#fancybox-title {
    font-family: Helvetica, Arial, sans-serif;
    font-size: 12px;
    z-index: 99997;
    display: none;
}

#fancybox-error {
    color: var(--bcs-text-2);
    font: normal 12px/20px Arial, sans-serif;
    padding: 14px;
    margin: 0;
}

#fancybox-img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

#fancybox-frame {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

/* Loading indicator: metin + spinner + Iptal baglantisi (bcs-modal.js _yuklemeGoster) */
#fancybox-loading {
    position: fixed;
    top: 45%;
    left: 50%;
    -webkit-transform: translate(-50%, -50%);
    transform: translate(-50%, -50%);
    z-index: 99998;
    display: none;
    white-space: nowrap;
    background: var(--bcs-white);
    color: var(--bcs-text);
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, .25);
    font: 14px/1.4 Arial, Helvetica, sans-serif;
}
#fancybox-loading a {
    margin-left: 12px;
    color: var(--bcs-danger);
    text-decoration: underline;
    cursor: pointer;
}
#fancybox-loading .fb-spin {
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-right: 6px;
    vertical-align: -2px;
    border: 2px solid var(--bcs-border-strong);
    border-top-color: var(--bcs-primary);
    border-radius: 50%;
    -webkit-animation: fb-spin .8s linear infinite;
    animation: fb-spin .8s linear infinite;
}
@keyframes fb-spin {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Sayfa ici pencere ($.fn.bcsPencere, bcs-modal.js): pop_box pencereleriyle ayni ortu ve kutu.
   z-index: pop_box ortusunun (99995) ustunde, yukleme gostergesi (99998) ve onay kutusunun (100000+) altinda. */
.bcs-pencere-ortu {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow-y: auto;
    z-index: 99996;
    display: none;
    justify-content: center;
    padding: 40px;
    background-color: rgba(0, 0, 0, .3);
}
.bcs-pencere-kutu {
    position: relative;
    margin: auto;
    max-width: calc(100vw - 80px);
    background: var(--bcs-white);
    border-radius: 4px;
    box-shadow: 0 5px 40px rgba(0,0,0,.35);
}
.bcs-pencere-kutu > .modal_dialog { max-width: 100%; }
.bcs-pencere-kutu > .modal_dialog > .header > span { cursor: default; }
/* Pencere alt satiri: islem dugmeleri sagda */
.modal_dialog .pencere-dugmeler { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
