/**
 * Netgsm Başvuru Sistemi - Modal Stilleri
 * Mobile-optimized, full-screen on mobile
 */

/* ============================================
   MODAL GENEL
   ============================================ */

.modal-content {
    border-radius: var(--border-radius);
    border: none;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
}

.modal-header {
    border-bottom: 1px solid #e9ecef;
    padding: 1.25rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.modal-header .modal-title {
    font-weight: 700;
}

.modal-header .btn-close {
    filter: invert(1);
    opacity: 0.8;
}

.modal-body {
    padding: 1.5rem;
    max-height: calc(100vh - 300px);
    overflow-y: auto;
}

.modal-footer {
    border-top: 1px solid #e9ecef;
    padding: 1rem 1.5rem;
}

/* ============================================
   MOBILE FULL-SCREEN MODAL
   ============================================ */

@media (max-width: 767px) {
    
    /* Modal tam ekran */
    .modal-fullscreen-sm-down {
        margin: 0;
        max-width: 100%;
        height: 100%;
    }
    
    .modal-fullscreen-sm-down .modal-content {
        height: 100vh;
        border-radius: 0;
        display: flex;
        flex-direction: column;
    }
    
    .modal-fullscreen-sm-down .modal-body {
        flex: 1;
        overflow-y: auto;
        max-height: none;
        -webkit-overflow-scrolling: touch;
    }
    
    .modal-fullscreen-sm-down .modal-header,
    .modal-fullscreen-sm-down .modal-footer {
        flex-shrink: 0;
    }
    
    /* Bottom sheet animasyonu için */
    .modal.fade .modal-fullscreen-sm-down {
        transform: translateY(100%);
        transition: transform 0.3s ease-out;
    }
    
    .modal.show .modal-fullscreen-sm-down {
        transform: translateY(0);
    }
    
    /* Swipe indicator */
    .modal-fullscreen-sm-down .modal-header::before {
        content: '';
        display: block;
        width: 40px;
        height: 4px;
        background: rgba(255,255,255,0.5);
        border-radius: 2px;
        margin: -0.5rem auto 0.5rem;
    }
    
}

/* ============================================
   UPLOAD SECTION
   ============================================ */

.upload-section {
    margin-bottom: 1.5rem;
}

.upload-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.upload-card {
    border: 2px dashed #dee2e6;
    border-radius: var(--border-radius);
    transition: var(--transition);
    overflow: hidden;
}

.upload-card:hover {
    border-color: var(--primary-color);
    background-color: rgba(20, 180, 150, 0.05);
}

.upload-card.drag-over {
    border-color: var(--primary-color);
    background-color: rgba(20, 180, 150, 0.1);
}

.upload-label {
    cursor: pointer;
    margin: 0;
    display: block;
}

.upload-placeholder {
    text-align: center;
    padding: 2rem 1rem;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

@media (max-width: 767px) {
    .upload-placeholder {
        padding: 1.5rem 1rem;
        min-height: 180px;
    }
}

.upload-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

/* ============================================
   FILE PREVIEW
   ============================================ */

.file-preview {
    text-align: center;
    padding: 1rem;
}

.preview-image {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

@media (max-width: 767px) {
    .preview-image {
        max-height: 150px;
    }
}

.file-info {
    text-align: center;
}

.file-info strong {
    display: block;
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
}

/* ============================================
   E-DEVLET BUTONU
   ============================================ */

.btn-edevlet {
    background: linear-gradient(135deg, #c62828 0%, #b71c1c 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    font-weight: 600;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.btn-edevlet:hover {
    background: linear-gradient(135deg, #b71c1c 0%, #c62828 100%);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(198, 40, 40, 0.3);
}

.btn-edevlet:disabled {
    background: #e0e0e0;
    color: #9e9e9e;
    cursor: not-allowed;
}

@media (max-width: 767px) {
    .btn-edevlet {
        font-size: 1.1rem;
        padding: 1.25rem 2rem;
    }
}

.status-badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.875rem;
}

@media (max-width: 767px) {
    .status-badge {
        display: block;
        text-align: center;
        padding: 0.75rem 1rem;
    }
}

/* ============================================
   MODAL ANIMATIONS
   ============================================ */

/* Fade & Slide Up */
@media (min-width: 768px) {
    .modal.fade .modal-dialog {
        transform: translateY(50px);
        opacity: 0;
        transition: transform 0.3s ease-out, opacity 0.3s ease-out;
    }
    
    .modal.show .modal-dialog {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ============================================
   MOBILE TOUCH OPTIMIZATIONS
   ============================================ */

@media (max-width: 767px) {
    
    /* Büyük butonlar */
    .modal-footer .btn {
        padding: 1rem 1.5rem;
        font-size: 1.1rem;
        min-height: 52px;
    }
    
    /* Upload butonları büyük */
    .upload-placeholder .btn {
        font-size: 0.95rem;
        padding: 0.75rem 1.25rem;
        min-height: 48px;
        width: 48%;
    }
    
    /* Alert büyük */
    .modal .alert {
        font-size: 0.95rem;
        padding: 1rem;
    }
    
}

/* ============================================
   IMAGE VIEWER MODAL
   ============================================ */

#imageViewerModal .modal-body {
    padding: 1rem;
    background: #000;
}

#imageViewerModal img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

@media (max-width: 767px) {
    #imageViewerModal img {
        max-height: calc(100vh - 200px);
    }
}

/* Pinch-to-zoom için */
#imageViewerModal img {
    touch-action: pinch-zoom;
}
