/* Modal Ana Container */
.iyzi-modal-container 
{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.iyzi-modal-container.active 
{
    opacity: 1;
    visibility: visible;
}

/* Modal İçerik */
.iyzi-modal-content 
{
    position: relative;
    background-color: #fff;
    border-radius: 6px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    /*overflow: hidden;*/
    transform: translateY(-30px);
    transition: transform 0.3s;
}

.iyzi-modal-container.active .iyzi-modal-content 
{
    transform: translateY(0);
}

/* Modal Header */
.iyzi-modal-header 
{
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f8f9fa;
}

.iyzi-modal-title
{
    font-size: 18px;
    font-weight: 600;
    color: #333;
    margin: 0;
}
.iyzi-modal-close 
{
    font-size: 24px;
    color: white;
    background-color:var(--color-danger);
    border: none;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    position: absolute;
    right: -15px;
    top: -15px;
    transition: background-color 0.2s, color 0.2s;
    z-index: 9999999;
}

.iyzi-modal-close:hover 
{
    background-color: #f1f1f1;
    color: #333;
}

/* .kilitli class ile X gizlenir, siyah bg + lock icon gösterilir */
.iyzi-modal-close .iyzi-modal-close-lock 
{
    display: none;
}
.iyzi-modal-close .iyzi-modal-close-x 
{
    display: inline;
}
.iyzi-modal-close.kilitli 
{
    background-color: #000 !important;
    color: #fff !important;
    cursor: not-allowed;
}
.iyzi-modal-close.kilitli:hover 
{
    background-color: #000 !important;
    color: #fff !important;
}
.iyzi-modal-close.kilitli .iyzi-modal-close-x 
{
    display: none !important;
}
.iyzi-modal-close.kilitli .iyzi-modal-close-lock 
{
    display: flex !important;
    align-items: center;
    justify-content: center;
}

/* Büyütme/Küçültme Butonu - Sadece Desktop */
@media screen and (min-width: 769px) 
{
    .iyzi-modal-resize 
    {
        font-size: 18px;
        color: white;
        background-color: #3498db;
        border: none;
        cursor: pointer;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 4px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.2);
        position: absolute;
        right: 30px;
        top: -15px;
        transition: background-color 0.2s, transform 0.2s;
        z-index: 9999998;
    }

    .iyzi-modal-resize:hover 
    {
        background-color: #2980b9;
        transform: scale(1.05);
    }

    .iyzi-modal-resize i 
    {
        font-size: 18px;
        color: white;
    }
}

/* Mobilde büyütme butonunu gizle */
@media screen and (max-width: 768px) 
{
    .iyzi-modal-resize 
    {
        display: none !important;
    }
}

/* Büyütülmüş Modal */
.iyzi-modal-container.iyzi-modal-maximized .iyzi-modal-content 
{
    width: 90% !important;
    height: 90% !important;
    min-height: 90% !important;
    max-height: 90% !important;
    transition: width 0.3s, height 0.3s, min-height 0.3s;
}

/* Modal Body */
.iyzi-modal-body 
{
    padding: 10px;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
}

/* Modal Footer */
.iyzi-modal-footer 
{
    padding: 15px 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    background-color: #f8f9fa;
}

.iyzi-modal-footer button 
{
    margin-left: 10px;
}

/* Modal Yükleniyor */
.iyzi-modal-loading 
{
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    text-align: center;
}

.iyzi-modal-loading:after 
{
    content: "";
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: iyzi-spin 1s linear infinite;
}

@keyframes iyzi-spin 
{
    0% 
    {
        transform: rotate(0deg);
    }
    100% 
    {
        transform: rotate(360deg);
    }
}

/* Üst Üste Modallar */
.iyzi-modal-container:nth-child(2) 
{
    z-index: 9001;
}

.iyzi-modal-container:nth-child(3) 
{
    z-index: 9002;
}

.iyzi-modal-container:nth-child(4) 
{
    z-index: 9003;
}

.iyzi-modal-container:nth-child(5) 
{
    z-index: 9004;
}

/* Responsive Tasarım */
@media screen and (max-width: 768px) 
{
    .iyzi-modal-content 
    {
        width: 90%;
    }
}

@media screen and (max-width: 576px) 
{
    .iyzi-modal-content 
    {
        width: 100% !important;
        height: 100% !important;
        max-height: 100% !important;
        border-radius: 0;
        max-width: none;
    }
    
    .iyzi-modal-container 
    {
        padding: 0;
    }
    
    .iyzi-modal-header 
    {
        padding: 15px;
    }
    
    .iyzi-modal-body 
    {
        padding: 15px;
    }
    
    .iyzi-modal-footer 
    {
        padding: 15px;
    }
}

/* Şablon Seçim Modalı */
.sablon-secim-modal
{
    width: 100%;
    max-width: 900px;
}

.sablon-secim-modal-header
{
    padding: 15px 20px;
    border-bottom: 1px solid #eee;
    background-color: #f8f9fa;
}

.sablon-secim-modal-header h3
{
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.sablon-secim-modal-body
{
    padding: 20px;
}

.sablon-items
{
    border-right: 1px solid #eee;
    padding-right: 15px;
}

.sablon-item
{
    border: 1px solid #ddd;
    padding: 10px;
    margin: 5px 0;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
    background-color: #fff;
    font-size: 14px;
    color: #333;
}

.sablon-item:hover
{
    background-color: #f0f0f0;
    border-color: #007bff;
    transform: translateX(3px);
}

.sablon-item-active
{
    background-color: #007bff;
    color: #fff;
    border-color: #007bff;
    font-weight: 600;
}

.sablon-item-active:hover
{
    background-color: #0056b3;
    border-color: #0056b3;
    transform: translateX(3px);
}

.sablon-icerik
{
    padding: 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-height: 300px;
    background: #f9f9f9;
    line-height: 1.6;
    font-size: 14px;
    color: #333;
}

.sablon-secim-modal-footer
{
    padding: 15px 20px;
    border-top: 1px solid #eee;
    background-color: #f8f9fa;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.sablon-secim-modal-footer .btn
{
    min-width: 80px;
}

/* Responsive */
@media screen and (max-width: 768px)
{
    .sablon-secim-modal-body .row
    {
        flex-direction: column;
    }
    
    .sablon-items
    {
        border-right: none;
        border-bottom: 1px solid #eee;
        padding-right: 0;
        padding-bottom: 15px;
        margin-bottom: 15px;
        max-height: 200px;
        overflow-y: auto;
    }
    
    .sablon-icerik
    {
        min-height: 200px;
    }
}

.iyzi-modal-body:has(.sablon-duzenle-kok)
{
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}

.sablon-duzenle-kok
{
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    height: 100%;
    min-height: 0;
}

.sablon-duzenle-baslik
{
    flex: 0 0 auto;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 10px 0;
    padding-bottom: 8px;
    border-bottom: 1px solid #e5e5e5;
}

.sablon-duzenle-sekme
{
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}

.sablon-duzenle-sekme > div
{
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}

.sablon-duzenle-sekme .tab-content
{
    flex: 1 1 auto;
    min-height: 0;
}

.sablon-duzenle-sekme .tab-pane
{
    min-height: 0;
    height: 100%;
}

.sablon-duzenle-sekme .tab-content > .tab-pane.active
{
    display: flex;
    flex-direction: column;
}

.sablon-onizleme-sekme
{
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    gap: 8px;
}

.sablon-onizleme-secim
{
    flex: 0 0 auto;
}

.sablon-onizleme-secim label
{
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
}

.sablon-onizleme-sonuc
{
    flex: 1 1 auto;
    min-height: 0;
    overflow: auto;
    border: 1px solid #e5e5e5;
    border-radius: 4px;
    padding: 12px 14px;
    background: #fff;
    font-size: 16px;
    line-height: 1.45;
}

.sablon-duzenle-govde
{
    display: flex;
    gap: 12px;
    flex: 1 1 auto;
    min-height: 0;
}

.sablon-duzenle-sol
{
    flex: 1 1 64%;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
}

.sablon-duzenle-sag
{
    flex: 0 0 34%;
    display: flex;
    flex-direction: column;
    min-width: 0;
    min-height: 0;
}

.sablon-duzenle-ust
{
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex: 0 0 auto;
    margin-bottom: 8px;
}

.sablon-duzenle-isim
{
    flex: 1 1 auto;
    min-width: 0;
}

.sablon-duzenle-tip
{
    flex: 0 0 auto;
}

.sablon-duzenle-kok label
{
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
}

.sablon-duzenle-editor
{
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}

.sablon-icerik-editor-wrap
{
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}

.sablon-duzenle-kok .ckeditor-textarea,
.sablon-icerik-editor-wrap textarea.form-control
{
    flex: 1 1 auto;
    width: 100%;
    height: 100%;
    min-height: 0;
    resize: none;
    font-size: 16px;
    line-height: 1.45;
}

.sablon-icerik-editor-wrap .ck.ck-editor
{
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    height: 100%;
    min-height: 0;
}

.sablon-icerik-editor-wrap .ck.ck-editor__main
{
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
}

.sablon-icerik-editor-wrap .ck.ck-editor__editable,
.sablon-icerik-editor-wrap .ck.ck-content
{
    flex: 1 1 auto;
    height: 100%;
    min-height: 0;
    font-size: 16px;
    line-height: 1.45;
}

.sablon-duzenle-kaydet
{
    flex: 0 0 auto;
    margin-top: 10px;
    text-align: right;
}

.sablon-degiskenleri-panel
{
    display: flex;
    flex-direction: column;
    height: 100%;
    margin-bottom: 0;
    min-height: 0;
}

.sablon-degiskenleri-panel .panel-heading
{
    flex: 0 0 auto;
}

.sablon-degiskenleri-panel .panel-body
{
    flex: 1 1 auto;
    overflow: auto;
    min-height: 0;
    padding: 10px;
}

.sablon-degisken-grup
{
    margin-bottom: 12px;
}

.sablon-degisken-grup-baslik
{
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 6px;
    border-left: 3px solid #e91e63;
    padding-left: 8px;
}

.sablon-degisken-etiket
{
    width: 46%;
}

.sablon-duzenle-kok .sablon-etiket-kopyala
{
    font-size: 13px;
}

.sablon-degisken-aciklama
{
    font-size: 14px;
}

@media screen and (max-width: 768px)
{
    .sablon-duzenle-govde
    {
        flex-direction: column;
        overflow: auto;
    }

    .sablon-duzenle-sag
    {
        flex: 1 1 220px;
    }
} 