/*
 * Dinder - Mobile Responsive Styles
 * Bu dosya mobil cihazlar için özel stil düzenlemelerini içerir
 */

/* ===========================================
   Global Mobile Utilities
   =========================================== */

/* Touch-friendly minimum sizes */
.btn, 
button, 
input[type="submit"], 
input[type="button"],
.form-control,
.form-select {
    min-height: 44px;
}

/* Smooth transitions */
* {
    -webkit-tap-highlight-color: transparent;
}

/* ===========================================
   Mobile Breakpoint: < 576px (Small phones)
   =========================================== */

@media (max-width: 575.98px) {
    
    /* Header & Navigation */
    .header-area {
        top: 0;
        padding: 0 10px;
    }
    
    .header-area .main-nav .logo h2 {
        font-size: 24px;
        margin-right: 15px;
        padding-right: 15px;
    }
    
    .page-heading {
        padding: 120px 15px 60px 15px;
        border-radius: 0 0 50px 50px;
    }
    
    .page-heading h3 {
        font-size: 28px;
    }
    
    /* Section Spacing */
    .section {
        margin-top: 60px;
    }
    
    .section-heading {
        margin-bottom: 30px;
    }
    
    .section-heading h2 {
        font-size: 24px;
        line-height: 32px;
    }
    
    /* Container Padding */
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    /* Footer */
    footer {
        margin-top: 60px;
        border-radius: 50px 50px 0 0;
        min-height: 100px;
    }
    
    footer p {
        line-height: 50px;
        font-size: 12px;
        padding: 20px 15px;
    }
    
    /* =========================================
       Login Page Mobile
       ========================================= */
    
    .login-wrapper {
        min-height: auto;
        padding: 20px 0;
    }
    
    .login-card {
        margin: 0 10px;
        border-radius: 12px;
    }
    
    .login-header {
        padding: 20px 15px;
    }
    
    .login-header h3 {
        font-size: 1.3rem;
    }
    
    .login-body {
        padding: 25px 20px;
    }
    
    /* =========================================
       Register Page Mobile
       ========================================= */
    
    .card.shadow-sm {
        margin: 10px !important;
    }
    
    .card-body.p-4 {
        padding: 20px !important;
    }
    
    /* Checkbox labels */
    .form-check {
        padding-left: 1.75rem;
    }
    
    .form-check-label {
        font-size: 13px;
        line-height: 1.4;
    }
    
    .form-check-label a {
        display: inline;
    }
    
    /* =========================================
       Discovery Page Mobile
       ========================================= */
    
    .discovery-card {
        padding: 15px;
        border-radius: 8px;
    }
    
    .discovery-card h2 {
        font-size: 1.4rem;
    }
    
    /* Filter Section - Stack vertically */
    .discovery-card .row.g-3.mb-4 > [class*="col-"] {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 10px;
    }
    
    /* Table to Cards conversion */
    .table-responsive {
        border: none;
    }
    
    .table-custom {
        border: 0;
    }
    
    .table-custom thead {
        display: none;
    }
    
    .table-custom tbody tr {
        display: block;
        margin-bottom: 15px;
        padding: 15px;
        background: #f8f9fa;
        border-radius: 10px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    }
    
    .table-custom tbody td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 0;
        border: none;
        border-bottom: 1px solid #eee;
    }
    
    .table-custom tbody td:last-child {
        border-bottom: none;
        padding-top: 12px;
        justify-content: center;
    }
    
    .table-custom tbody td:before {
        content: attr(data-label);
        font-weight: 600;
        color: #555;
        font-size: 13px;
    }
    
    /* Discovery Buttons */
    .btn-details,
    .btn-outline-danger {
        width: 100%;
        margin-top: 5px;
        padding: 10px 15px;
    }
    
    /* Modal Fullscreen on Mobile */
    .modal-dialog {
        margin: 0;
        max-width: 100%;
        height: 100%;
    }
    
    .modal-content {
        border-radius: 0;
        height: 100%;
        border: none;
    }
    
    .modal-dialog-scrollable .modal-content {
        max-height: 100vh;
    }
    
    .modal-body {
        padding: 15px;
    }
    
    .modal-body .row.g-3 > [class*="col-"] {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    /* =========================================
       CompleteProfile Page Mobile
       ========================================= */
    
    .profile-card {
        border-radius: 10px;
        margin: 0 -15px;
    }
    
    .profile-header {
        padding: 20px 15px;
    }
    
    .profile-header h2 {
        font-size: 1.4rem;
    }
    
    .profile-header p {
        font-size: 13px;
    }
    
    .card-body.p-4.p-md-5 {
        padding: 20px 15px !important;
    }
    
    .section-title {
        font-size: 1.1rem;
        margin-top: 20px;
        padding-bottom: 8px;
    }
    
    /* Form Grid - All columns full width on mobile */
    .card-body .row.g-3 > [class*="col-md-"],
    .card-body .row.g-3 > [class*="col-lg-"] {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    /* Special cases: Height/Weight side by side */
    .card-body .row.g-3 > .col-md-2 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    .form-label {
        font-size: 14px;
        margin-bottom: 5px;
    }
    
    .form-control,
    .form-select {
        font-size: 16px; /* Prevents iOS zoom */
        padding: 10px 12px;
    }
    
    /* Radio Button Lists */
    .form-check-input-list {
        display: flex;
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .form-check-input-list label {
        font-size: 14px;
        margin-right: 10px;
    }
    
    /* File Upload */
    .form-control[type="file"] {
        padding: 8px;
        font-size: 14px;
    }
    
    /* Oath Box */
    .oath-box {
        padding: 12px;
        margin: 15px 0;
    }
    
    .oath-box label {
        font-size: 13px;
        line-height: 1.4;
    }
    
    /* Save Button */
    .btn-save {
        width: 100%;
        padding: 14px 20px;
        font-size: 1rem;
    }
    
    /* =========================================
       Profile Page Mobile
       ========================================= */
    
    .profile-container {
        margin: 10px;
        padding: 15px;
        border-radius: 10px;
    }
    
    .profile-header h1 {
        font-size: 1.5rem;
    }
    
    .profile-section h3 {
        font-size: 1.1rem;
    }
    
    /* Data rows - stack labels and values */
    .data-row {
        flex-direction: column;
        margin-bottom: 12px;
    }
    
    .data-label {
        width: 100%;
        margin-bottom: 3px;
        font-size: 13px;
        color: #777;
    }
    
    .data-value {
        font-size: 15px;
    }
    
    /* Photo Gallery */
    .photo-gallery {
        flex-direction: column;
        align-items: center;
    }
    
    .photo-gallery img {
        width: 100%;
        max-width: 250px;
        height: auto;
        aspect-ratio: 1;
        margin-bottom: 10px;
    }
    
    /* Profile Buttons */
    .profile-container > div:last-child {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    
    .profile-container .btn-submit {
        width: 100%;
        padding: 12px;
        margin: 0 !important;
    }
    
    /* =========================================
       Matches Page Mobile
       ========================================= */
    
    .match-container {
        margin: 10px;
        padding: 20px 15px;
        max-width: 100%;
    }
    
    .match-container h1 {
        font-size: 1.5rem;
    }
    
    .status-box {
        padding: 15px;
        font-size: 1rem;
    }
    
    .partner-info h3 {
        font-size: 1.1rem;
    }
    
    .telegram-box {
        padding: 12px;
        font-size: 1rem;
        word-break: break-all;
    }
}

/* ===========================================
   Tablet Breakpoint: 576px - 768px
   =========================================== */

@media (min-width: 576px) and (max-width: 767.98px) {
    
    .page-heading {
        padding: 150px 20px 80px 20px;
        border-radius: 0 0 80px 80px;
    }
    
    .page-heading h3 {
        font-size: 36px;
    }
    
    /* Discovery - 2 column filters */
    .discovery-card .row.g-3.mb-4 > [class*="col-md-3"],
    .discovery-card .row.g-3.mb-4 > [class*="col-md-2"] {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    /* CompleteProfile - 2 columns for some fields */
    .card-body .row.g-3 > .col-md-6 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    .card-body .row.g-3 > .col-md-4 {
        flex: 0 0 50%;
        max-width: 50%;
    }
    
    /* Photo Gallery */
    .photo-gallery img {
        width: 120px;
        height: 120px;
    }
}

/* ===========================================
   Medium Devices: 768px - 992px
   =========================================== */

@media (min-width: 768px) and (max-width: 991.98px) {
    
    .page-heading {
        padding: 160px 0 100px 0;
        border-radius: 0 0 100px 100px;
    }
    
    /* Modal - Not fullscreen but larger */
    .modal-dialog {
        max-width: 90%;
    }
}

/* ===========================================
   Touch Device Optimizations
   =========================================== */

@media (hover: none) and (pointer: coarse) {
    
    /* Larger tap targets */
    .btn,
    button,
    a.btn {
        min-height: 48px;
        padding: 12px 20px;
    }
    
    /* Better spacing for touch */
    .form-check {
        padding: 8px 0;
        padding-left: 2rem;
    }
    
    /* Dropdown touch-friendly */
    .form-select option {
        padding: 12px;
    }
}

/* ===========================================
   Safe Area (Notch) Support
   =========================================== */

@supports (padding: max(0px)) {
    .header-area {
        padding-left: max(10px, env(safe-area-inset-left));
        padding-right: max(10px, env(safe-area-inset-right));
    }
    
    footer {
        padding-bottom: max(10px, env(safe-area-inset-bottom));
    }
}

/* ===========================================
   Improve Text Readability on Mobile
   =========================================== */

@media (max-width: 767.98px) {
    body {
        font-size: 15px;
        line-height: 1.6;
    }
    
    p {
        font-size: 14px;
        line-height: 1.6;
    }
    
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    h4 { font-size: 1.1rem; }
    h5 { font-size: 1rem; }
    h6 { font-size: 0.9rem; }
}

/* ===========================================
   Loading/Preloader Mobile Optimization
   =========================================== */

@media (max-width: 575.98px) {
    .preloader-inner {
        transform: scale(0.8);
    }
}
