/* Upload Section Styles */
.upload-section {
    position: relative;
    background-color: #fafbff;
    overflow: hidden;
    padding: 60px 0;
}

.upload-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../img/pattern-bg.png');
    background-size: cover;
    opacity: 0.03;
    z-index: 0;
}

.upload-section .container {
    position: relative;
    z-index: 1;
}

/* Arka plan rengi */
.upload-section-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(248, 249, 255, 0.7) 0%, rgba(240, 245, 255, 1) 100%);
    z-index: -1;
}

/* Upload Card */
.upload-card {
    background-color: #ffffff;
    border-radius: 16px;
    transition: all 0.3s ease;
    z-index: 2;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08) !important;
}

.upload-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12) !important;
}

/* Sekme Navigasyonu - Güncellenmiş */
.upload-tabs {
    margin-bottom: 30px;
}

.upload-tabs .nav-pills {
    background: #f7f7f9;
    padding: 0.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
    display: flex;
    gap: 10px; /* Butonlar arasında boşluk ekle */
}

.upload-tabs .nav-link {
    border: none;
    color: var(--secondary-color);
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 10px;
    font-weight: 500;
    transition: all 0.3s ease;
    flex: 1; /* Butonların genişliklerini eşit yap */
    text-align: center; /* Metin ortalama */
}

.upload-tabs .nav-link:hover {
    background-color: rgba(67, 97, 238, 0.05);
    color: var(--primary-color);
}

.upload-tabs .nav-link.active {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 10px rgba(67, 97, 238, 0.2);
}

.upload-tabs .nav-link i {
    margin-right: 8px;
}

.upload-tabs .nav-link:hover:not(.active) {
    background-color: rgba(67, 97, 238, 0.1);
}

/* Dosya Yükleme Alanı */
.upload-area {
    border: 2px dashed rgba(0, 0, 0, 0.1);
    border-radius: 20px;
    padding: 40px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background-color: #f8faff;
    position: relative;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.upload-area:hover {
    border-color: var(--primary-color);
    background-color: rgba(67, 97, 238, 0.03);
}

.upload-area.drag-over {
    animation: pulse 1.5s infinite;
    border-color: var(--primary-color);
    background-color: rgba(67, 97, 238, 0.05);
    border-width: 3px;
}

.upload-area .file-input {
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 2;
}

.upload-icon-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

.upload-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background-color: rgba(67, 97, 238, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    font-size: 2rem;
    transition: all 0.3s ease;
}

.upload-icon i {
    font-size: 36px;
    color: var(--primary-color);
}

.upload-area:hover .upload-icon {
    transform: translateY(-5px);
    background-color: rgba(67, 97, 238, 0.15);
}

/* Seçilen Dosya Alanı */
.selected-file {
    margin-top: 15px;
    background-color: #eef2ff;
    border-radius: 10px;
    width: 100%;
    max-width: 100%;
}

.selected-file .d-flex {
    width: 100%;
}

.file-name {
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
}

/* Kamera Konteyner */
.camera-container {
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    border-radius: 16px;
    background-color: #f8faff !important;
}

.camera-icon-wrapper {
    margin-bottom: 20px;
}

.camera-icon {
    width: 80px;
    height: 80px;
    background-color: rgba(67, 97, 238, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    transition: all 0.3s ease;
    color: var(--primary-color);
    font-size: 2.5rem;
}

.camera-icon i {
    font-size: 36px;
    color: var(--primary-color);
}

.camera-icon.camera-inactive {
    background-color: rgba(108, 117, 125, 0.1);
}

.camera-icon.camera-inactive i {
    color: #6c757d;
}

.upload-area:hover .upload-icon {
    transform: scale(1.05);
}

/* Fotoğraf Önizleme */
.photo-preview-container {
    max-width: 80%;
    margin: 0 auto;
}

.photo-preview-frame {
    padding: 10px;
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    max-width: 80%;
    margin: 0 auto;
    border: 1px solid #eaeaea;
}

.max-height-200 {
    max-height: 200px;
    object-fit: contain;
}

/* Camera Video Stream ve Canvas */
#camera-stream, #camera-preview {
    max-width: 100%;
    max-height: 350px;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Tips Box */
.tips-box {
    background-color: #f8f9fa;
    border-left: 3px solid #ffc107;
    border-radius: 8px;
}

.tips-icon {
    color: #ffc107;
    font-size: 24px;
    height: 40px;
    width: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Form Controls */
.form-floating {
    margin-bottom: 1rem;
}

.form-floating > .form-control,
.form-floating > .form-select {
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    padding: 1rem;
    height: calc(3.5rem + 2px);
    line-height: 1.5;
    background-color: #f8f9fa;
}

.form-floating > .form-control:focus,
.form-floating > .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(67, 97, 238, 0.1);
    background-color: white;
}

.form-floating > textarea.form-control {
    height: 100px;
}

.form-floating > label {
    padding: 1rem;
    color: #6c757d;
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-select:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label,
.form-floating > .form-select:not(:placeholder-shown) ~ label {
    transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
    color: var(--primary-color);
}

/* Modern Input Styles */
.modern-input, .modern-select {
    border-radius: 12px;
    padding: 12px 16px;
    border: 1px solid #e0e6f0;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
    height: auto;
}

.modern-input:focus, .modern-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(67, 97, 238, 0.15);
    background-color: white;
}

.form-label {
    font-weight: 500;
    font-size: 0.9rem;
    color: #495057;
    margin-bottom: 0.5rem;
}

/* Modern Checkbox */
.checkbox-modern {
    padding-left: 2.5rem;
}

.checkbox-modern .form-check-input {
    width: 20px;
    height: 20px;
    margin-top: 0.2em;
    border-radius: 6px;
    border: 1px solid #cfd4da;
    background-color: white;
    cursor: pointer;
}

.checkbox-modern .form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.checkbox-modern .form-check-input:focus {
    box-shadow: 0 0 0 0.25rem rgba(67, 97, 238, 0.25);
}

.checkbox-modern .form-check-label {
    font-size: 0.9rem;
    line-height: 1.5rem;
    cursor: pointer;
}

/* Modern Buttons */
.btn-glow {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-glow::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    bottom: -50%;
    left: -50%;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.3) 50%, rgba(255, 255, 255, 0));
    transform: rotate(30deg) translate(-100%, 0);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    100% {
        transform: rotate(30deg) translate(100%, 0);
    }
}

.btn-glow:hover:before {
    left: 100%;
}

.btn-primary.btn-glow {
    background: linear-gradient(90deg, #4361ee, #3a0ca3);
    border: none;
}

.btn-success.btn-glow {
    background: linear-gradient(90deg, #20c997, #0ca678);
    border: none;
}

.btn-hover {
    transition: all 0.3s ease;
}

.btn-hover:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.btn-hover:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 0;
    background: rgba(0, 0, 0, 0.05);
    z-index: -1;
    transition: all 0.3s ease;
}

.btn-hover:hover:after {
    height: 100%;
}

/* Modern Button Styles */
.btn-modern {
    position: relative;
    overflow: hidden;
    border: none;
    background: linear-gradient(45deg, #4361ee, #3a0ca3);
    color: white;
    font-weight: 500;
    box-shadow: 0 4px 10px rgba(67, 97, 238, 0.2);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(67, 97, 238, 0.25);
    color: white;
}

.btn-modern:active {
    transform: translateY(1px);
}

.btn-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(255,255,255,0.1), rgba(255,255,255,0));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-modern:hover::before {
    opacity: 1;
}

/* Loading Button */
.btn .btn-loader {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: inherit;
    border-radius: inherit;
}

.btn .btn-text {
    transition: opacity 0.3s ease;
}

.btn.loading .btn-text {
    opacity: 0;
}

.btn.loading .btn-loader {
    opacity: 1;
}

/* Responsive Ayarlamalar */
@media (max-width: 767px) {
    .upload-tabs .nav-link {
        font-size: 0.85rem;
        padding: 10px 8px;
    }
    
    .upload-icon, .camera-icon {
        width: 60px;
        height: 60px;
        font-size: 22px;
    }
    
    .btn {
        font-size: 0.9rem;
    }
    
    .camera-container {
        min-height: 220px;
    }
    
    .btn-modern {
        width: 100%;
        margin-bottom: 10px;
    }
}

@media (max-width: 767.98px) {
    .upload-tabs .nav-link {
        padding: 10px;
        font-size: 14px;
    }

    .upload-area {
        padding: 30px 15px;
    }

    .upload-icon {
        width: 60px;
        height: 60px;
    }

    .upload-icon i {
        font-size: 28px;
    }

    .camera-icon {
        width: 60px;
        height: 60px;
    }

    .camera-icon i {
        font-size: 28px;
    }

    .btn-lg {
        font-size: 1rem;
        padding: 0.6rem 1.5rem;
    }

    #selected-photo-preview {
        padding: 15px;
        position: relative;
        z-index: 100;
        background-color: #f8f9fa;
        border-radius: 10px;
        margin: 10px auto;
        max-width: 95%;
        display: block !important;
    }
    
    .button-container {
        position: relative;
        z-index: 100;
        margin: 15px 0 !important;
        padding-top: 5px;
    }
    
    .camera-container {
        display: flex;
        flex-direction: column;
        justify-content: center;
        position: relative;
        overflow: visible !important;
        min-height: 250px;
        padding: 15px 0;
    }
    
    #mobile-preview {
        max-width: 95% !important;
        width: auto;
        height: auto;
        max-height: 180px !important;
        margin: 0 auto;
        display: block;
        object-fit: contain;
        box-shadow: 0 3px 10px rgba(0,0,0,0.1) !important;
    }
    
    .tips-box {
        margin-top: 2rem !important;
        position: relative;
        z-index: 10;
    }
    
    .photo-preview-container {
        position: relative;
        z-index: 100;
        width: 100%;
        height: auto;
        overflow: visible !important;
        display: flex;
        justify-content: center;
        margin: 0 auto;
        padding: 5px;
        background-color: white;
        border-radius: 8px;
    }
    
    #mobile-camera {
        position: relative;
        z-index: 100;
        width: 100%;
    }

    .selected-file {
        width: 100%;
    }
    
    .file-name {
        font-size: 0.9rem;
    }
}

@media (max-width: 575px) {
    .upload-tabs .nav-link {
        padding: 8px;
    }
    
    .upload-icon, .camera-icon {
        width: 50px;
        height: 50px;
        font-size: 18px;
    }
    
    #desktop-camera-controls .btn {
        margin-right: 5px;
        margin-left: 5px;
        padding: 8px 15px;
        font-size: 0.85rem;
    }
    
    .tips-box {
        font-size: 0.8rem;
    }
    
    .tips-box ul {
        padding-left: 1rem;
    }
}

/* Error States */
.is-invalid {
    border-color: var(--danger-color) !important;
}

.invalid-feedback {
    color: var(--danger-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Camera Controls */
#desktop-camera-controls {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

/* Drag and drop animation */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

/* Önizleme konteyner geliştirmeleri */
.photo-preview-container {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background-color: white;
    min-height: 100px;
    padding: 10px;
}

/* Butonlar için iyileştirmeler */
.button-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 15px !important;
    width: 100%;
    position: relative;
    z-index: 200;
}

/* Taşma kontrolü */
.tab-pane {
    overflow: visible !important;
    position: relative;
}

/* Devam et butonu için düzeltme */
#confirm-mobile-photo, #change-photo {
    position: relative;
    z-index: 200;
}

/* Önizleme alanı için kapsayıcı */
#selected-photo-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

/* Mobil kamera seçim alanı için düzenleme */
#mobile-camera-select {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
}

/* Fotoğraf önizleme resmi geliştirmeleri */
#mobile-preview {
    position: relative !important;
    z-index: 101;
    max-height: 200px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
    border-radius: 6px;
}