/**
 * Netgsm Başvuru Sistemi - Ana Stil Dosyası
 * MOBILE-FIRST Responsive Design
 */

/* ============================================
   GLOBAL STYLES
   ============================================ */

:root {
    --primary-color: #14B496;
    --secondary-color: #0f9178;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --success-color: #28a745;
    --dark-color: #2c3e50;
    --light-color: #f8f9fa;
    --border-radius: 12px;
    --transition: all 0.3s ease;
    --vh: 1vh; /* JavaScript ile güncellenecek */
}

* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px; /* iOS zoom engellemek için min 16px */
    line-height: 1.6;
    color: #333;
    background-color: #f4f6f9;
}

/* iOS Safari için smooth scrolling */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Touch-friendly buton boyutları (min 44x44px) */
.btn {
    min-height: 44px;
    min-width: 44px;
    touch-action: manipulation;
}

/* ============================================
   HEADER SECTION
   ============================================ */

.header-section {
    background: white;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.logo {
    height: 32px;
    width: auto;
}

@media (min-width: 768px) {
    .logo {
        height: 48px;
    }
}

.header-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark-color);
    margin: 0;
}

@media (min-width: 768px) {
    .header-title {
        font-size: 1.75rem;
    }
}

.header-subtitle {
    font-size: 0.875rem;
    color: #6c757d;
}

@media (min-width: 768px) {
    .header-subtitle {
        font-size: 1rem;
    }
}

/* ============================================
   MAIN SECTION
   ============================================ */

.main-section {
    padding: 1.5rem 0;
}

@media (min-width: 768px) {
    .main-section {
        padding: 3rem 0;
    }
}

.section-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
    .section-title {
        font-size: 2.5rem;
    }
}

.section-subtitle {
    font-size: 0.95rem;
}

@media (min-width: 768px) {
    .section-subtitle {
        font-size: 1.1rem;
    }
}

/* ============================================
   STATUS CARD
   ============================================ */

.status-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.25rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

@media (min-width: 768px) {
    .status-card {
        padding: 1.5rem;
    }
}

.status-icon {
    font-size: 2rem;
}

@media (min-width: 768px) {
    .status-icon {
        font-size: 2.5rem;
    }
}

/* ============================================
   SELECTED NUMBERS CARD
   ============================================ */

.selected-numbers-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.card-header-custom {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 1rem;
    font-weight: 600;
    font-size: 1rem;
}

@media (min-width: 768px) {
    .card-header-custom {
        padding: 1.25rem;
        font-size: 1.1rem;
    }
}

.card-body-custom {
    padding: 1.5rem;
}

@media (min-width: 768px) {
    .card-body-custom {
        padding: 2rem;
    }
}

/* ============================================
   ACTION CARDS
   ============================================ */

.action-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
    position: relative;
    transition: var(--transition);
    cursor: pointer;
}

@media (min-width: 768px) {
    .action-card {
        padding: 2rem;
    }
}

.action-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

/* Touch feedback */
.action-card.touch-active {
    transform: scale(0.98);
}

.card-number {
    position: absolute;
    top: 1rem;
    left: 1rem;
    background: var(--primary-color);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.25rem;
}

@media (min-width: 768px) {
    .card-number {
        width: 48px;
        height: 48px;
        font-size: 1.5rem;
    }
}

.card-content {
    padding-left: 3rem;
}

@media (min-width: 768px) {
    .card-content {
        padding-left: 4rem;
    }
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .card-title {
        font-size: 1.25rem;
    }
}

.btn-action {
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    min-height: 48px;
}

@media (min-width: 768px) {
    .btn-action {
        padding: 0.875rem 2rem;
    }
}

/* ============================================
   PROGRESS INDICATOR
   ============================================ */

.progress-indicator {
    text-align: right;
}

.progress-text {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    display: block;
}

@media (min-width: 768px) {
    .progress-text {
        font-size: 1.5rem;
    }
}

.progress-custom {
    height: 8px;
    width: 100px;
    margin-left: auto;
}

@media (min-width: 768px) {
    .progress-custom {
        height: 10px;
        width: 150px;
    }
}

/* ============================================
   PRICE SECTION
   ============================================ */

.price-section {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.price-old {
    font-size: 1.5rem;
    color: #6c757d;
    text-decoration: line-through;
    font-weight: 600;
}

@media (min-width: 768px) {
    .price-old {
        font-size: 2rem;
    }
}

.price-free {
    font-size: 1.75rem;
    color: var(--success-color);
    font-weight: 700;
}

@media (min-width: 768px) {
    .price-free {
        font-size: 2.5rem;
    }
}

/* ============================================
   FOOTER
   ============================================ */

.footer-section {
    background: white;
    border-top: 1px solid #e9ecef;
    margin-top: 3rem;
}

/* ============================================
   GLOBAL LOADER
   ============================================ */

.global-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

/* ============================================
   RESPONSIVE UTILITIES
   ============================================ */

/* Mobilde gizle */
@media (max-width: 767px) {
    .hide-mobile {
        display: none !important;
    }
}

/* Desktop'ta gizle */
@media (min-width: 768px) {
    .hide-desktop {
        display: none !important;
    }
}

/* Touch-friendly spacing */
@media (max-width: 767px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Safe area için padding (iOS) */
@supports (padding: max(0px)) {
    body {
        padding-bottom: max(0px, env(safe-area-inset-bottom));
    }
}

/* ============================================
   APP HEADER - Revize
   ============================================ */

.app-header {
    background: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo-img {
    height: 32px;
    width: auto;
}

@media (min-width: 768px) {
    .logo-img {
        height: 48px;
    }
}

.application-number-badge {
    background: var(--light-color);
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    display: inline-block;
}

@media (min-width: 768px) {
    .application-number-badge {
        font-size: 1rem;
    }
}

/* ============================================
   STEPPER - Aşamalı Sistem
   ============================================ */

.stepper-container {
    margin: 2rem 0;
    padding: 1.5rem;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.stepper-progress {
    width: 100%;
    height: 6px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.stepper-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transition: width 0.5s ease;
    border-radius: 10px;
}

/* Error state progress bar */
.stepper-progress-bar.error {
    background: linear-gradient(90deg, #dc3545, #c82333) !important;
}

.stepper-steps {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.stepper-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    min-width: 60px;
    text-align: center;
}

.stepper-step-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e9ecef;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: var(--transition);
    margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
    .stepper-step-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
}

.stepper-step.active .stepper-step-icon {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(20, 180, 150, 0.3);
}

.stepper-step.completed .stepper-step-icon {
    background: var(--success-color);
    color: white;
}

/* Error state (Adım 6 - Hata ekranı) */
.stepper-step.active.error .stepper-step-icon {
    background: #dc3545 !important;
    color: white;
    box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

.stepper-step-label {
    font-size: 0.7rem;
    color: #6c757d;
    font-weight: 500;
}

@media (min-width: 768px) {
    .stepper-step-label {
        font-size: 0.875rem;
    }
}

.stepper-step.active .stepper-step-label {
    color: var(--primary-color);
    font-weight: 700;
}

.stepper-step.completed .stepper-step-label {
    color: var(--success-color);
}

/* Error state label */
.stepper-step.active.error .stepper-step-label {
    color: #dc3545 !important;
    font-weight: 700;
}

/* ============================================
   STEP CARD
   ============================================ */

.step-card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.step-header {
    text-align: center;
    padding: 2rem 1rem 1rem;
}

.step-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.step-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.step-description {
    font-size: 1rem;
    color: #6c757d;
    margin-bottom: 0;
}

/* ============================================
   UPLOAD ZONE
   ============================================ */

.upload-zone {
    border: 3px dashed #ced4da;
    border-radius: var(--border-radius);
    padding: 3rem 1.5rem;
    text-align: center;
    background: #f8f9fa;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.upload-zone:hover {
    border-color: var(--primary-color);
    background: #e9f9f6;
}

.upload-zone.dragover {
    border-color: var(--primary-color);
    background: #e9f9f6;
    transform: scale(1.02);
}

.upload-icon {
    font-size: 4rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.upload-zone h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

.upload-zone p {
    color: #6c757d;
    margin-bottom: 1rem;
}

.upload-zone input[type="file"] {
    position: absolute;
    left: -9999px;
}

/* Upload butonları (Dosya Seç & Fotoğraf Çek) */
.upload-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.5rem;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

.upload-buttons .btn {
    width: 100%;
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

.upload-buttons .btn i {
    font-size: 1.2rem;
    vertical-align: middle;
}

/* Desktop ve tablet için yan yana butonlar */
@media (min-width: 576px) {
    .upload-buttons {
        flex-direction: row;
        justify-content: center;
        max-width: 100%;
    }
    
    .upload-buttons .btn {
        width: auto;
        min-width: 180px;
    }
}

/* ============================================
   FILE PREVIEW
   ============================================ */

.file-preview {
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    background: white;
    margin-top: 1rem;
}

.file-preview-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.file-preview-image {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.file-preview-info {
    text-align: center;
}

.file-icon {
    font-size: 3rem;
    color: var(--danger-color);
    margin-bottom: 0.5rem;
}

.file-name {
    display: block;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.file-size {
    display: block;
    color: #6c757d;
    font-size: 0.875rem;
}

/* ============================================
   STEP ACTIONS
   ============================================ */

.step-actions {
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e9ecef;
}

.step-actions .btn {
    flex: 1;
    padding: 0.875rem 1.5rem;
    font-weight: 600;
    font-size: 1rem;
}

@media (max-width: 576px) {
    .step-actions {
        flex-direction: column-reverse;
    }
}

/* ============================================
   E-DEVLET FORM
   ============================================ */

.edevlet-container {
    max-width: 500px;
    margin: 0 auto;
}

.edevlet-header {
    text-align: center;
    margin-bottom: 2rem;
}

.edevlet-logo {
    max-width: 200px;
    margin-bottom: 1rem;
}

.edevlet-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.edevlet-form .form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.edevlet-form .form-control {
    font-size: 1rem;
}

/* ============================================
   ERROR SCREEN (Adım 6)
   ============================================ */

.edevlet-error-container {
    padding: 2rem 1rem;
    max-width: 600px;
    margin: 0 auto;
}

.error-icon-wrapper {
    text-align: center;
    margin-bottom: 2rem;
}

.error-icon {
    font-size: 5rem;
    color: var(--warning-color);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.error-title {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 1rem;
    text-align: center;
}

.error-message {
    font-size: 1rem;
    color: #6c757d;
    text-align: center;
    margin-bottom: 2rem;
}

.info-box {
    background: #f8f9fa;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin: 2rem 0;
}

.info-box h4 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.contact-info p {
    margin-bottom: 0.5rem;
}

/* ============================================
   HELP SECTION
   ============================================ */

.help-section {
    margin-top: 2rem;
}

.help-section .card {
    border: none;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.help-section h5 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* ============================================
   LOADING OVERLAY
   ============================================ */

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-overlay .spinner-border {
    width: 3rem;
    height: 3rem;
}

.loading-overlay p {
    margin: 0;
    font-weight: 600;
    color: var(--dark-color);
}

/* ============================================
   LOADING CONTENT (Inline Loading)
   ============================================ */

.loading-content {
    text-align: center;
    padding: 2rem 1rem;
    margin: 2rem 0;
}

.loading-content.hide {
    display: none !important;
}

.loading {
    width: 60px;
    height: 60px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    margin: 0 auto 1rem;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loader-info {
    display: block;
    font-size: 1rem;
    color: var(--dark-color);
    font-weight: 500;
    margin-top: 1rem;
}

.hide {
    display: none !important;
}

/* ============================================
   FOOTER
   ============================================ */

.app-footer {
    background: white;
    border-top: 1px solid #e9ecef;
    padding: 2rem 0;
    margin-top: 3rem;
}
