/* ===== MOBILE FIRST CSS - Sosyal Medya Uygulamasi ===== */
/* Tum stiller once mobil (< 576px) icin yazilir, buyuk ekranlar min-width ile genisletilir */

:root,
[data-bs-theme="light"] {
    --bs-primary: #1aac9d;
    --bs-primary-rgb: 26, 172, 157;
    --bs-blue: #1aac9d;
    --bs-link-color: #138f83;
    --bs-link-hover-color: #0e7268;
    --bs-primary-text-emphasis: #084541;
    --bs-primary-bg-subtle: #d1f5f0;
    --bs-primary-border-subtle: #7dd4ca;
    --bs-focus-ring-color: rgba(26, 172, 157, 0.35);
    --sm-accent-hover: #159890;
    --sm-accent-active: #117a72;
}

/* ===== BASE (Mobile) ===== */
* { box-sizing: border-box; }

body {
    font-family: Arial, sans-serif;
    background-color: #f0f2f5;
    margin: 0;
    padding: 0;
    color: #1c1e21;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    font-size: 14px;
    line-height: 1.5;
}

/* ===== NAVBAR ===== */
.top-nav {
    background-color: #ffffff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
    padding: 8px 0;
}
.top-nav .nav-icon {
    width: 22px;
    height: 22px;
    margin-right: 4px;
    vertical-align: middle;
}
.navbar-brand img.logo-icon {
    width: 28px;
    height: 28px;
    margin-right: 6px;
}
.badge-notification {
    position: absolute;
    top: -5px;
    right: -10px;
    padding: 0.2em 0.35em;
    font-size: 0.7em;
}

/* ===== BANNER ===== */
.timeline-banner-container {
    min-height: 140px;
    overflow: visible;
    border-radius: 0;
    margin-bottom: 1rem;
}
.timeline-banner-container .profile-cover-photo {
    height: 140px;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}
.timeline-banner-container .position-absolute img.rounded-circle,
.timeline-banner-container .position-absolute img.profile-picture-round {
    width: 80px;
    height: 80px;
    border: 3px solid white;
}

/* ===== KULLANICI ADI ALANI ===== */
.user-name-bar {
    margin-top: 44px;
    margin-bottom: 12px;
    padding-left: 12px;
}
.user-name-bar .fw-bold {
    font-size: 1.1rem;
}

/* ===== 3 SUTUNLU LAYOUT - Bootstrap grid'e mudahale etme ===== */

/* ===== KARTLAR ===== */
.card {
    border-radius: 8px;
    border: 1px solid #e4e6eb;
}
.card.shadow-sm {
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* ===== KUNYE KARTI ===== */
.card-title {
    font-size: 1rem;
    margin-bottom: 0.75rem;
}
.card-body ul.list-unstyled li {
    padding: 4px 0;
    border-bottom: 1px solid #f0f2f5;
}
.card-body ul.list-unstyled li:last-child {
    border-bottom: none;
}

/* ===== POST OLUSTURMA ===== */
.create-post-container {
    margin: 0 0 12px 0;
}
.create-post-container .card-title {
    font-size: 0.95rem;
}
.create-post-container textarea {
    min-height: 60px;
    resize: vertical;
}

/* ===== RENK PALETI ===== */
.color-palette-container {
    margin-bottom: 12px;
}
.color-boxes {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
}
.color-box {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.1s ease;
    will-change: transform;
}
.color-box:hover {
    transform: scale(1.15);
}
.color-box.selected {
    box-shadow: 0 0 0 2px var(--bs-primary);
    transform: scale(1.15);
}
.color-box.clear-color {
    background-color: #f0f0f0;
    color: #333;
    text-align: center;
    font-size: 9px;
    line-height: 24px;
    border: 1px solid #ccc;
    width: auto;
    padding: 0 6px;
}

/* ===== DOSYA YUKLEME ALANI ===== */
.file-drop-zone-label {
    display: block;
    cursor: pointer;
}
.file-drop-zone {
    border: 2px dashed #ccc;
    padding: 16px;
    text-align: center;
    border-radius: 6px;
    transition: background-color 0.2s, border-color 0.2s;
}
.file-drop-zone.dragover {
    background-color: #f0f0f0;
    border-color: #aaa;
}
.file-drop-zone i {
    font-size: 1.3rem;
    margin-right: 6px;
}
.file-name-display {
    display: block;
    margin-top: 8px;
    font-style: italic;
    color: #555;
    font-size: 0.85em;
}

/* ===== TIMELINE POSTLARI ===== */
#timeline-posts .card {
    margin-bottom: 12px;
}
.post-content-text {
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}
.post-avatar,
#timeline-posts img.rounded-circle {
    width: 36px;
    height: 36px;
    object-fit: cover;
}

/* ===== POST AKSIYONLARI ===== */
.post-actions {
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
    border-top: 1px solid #efefef;
    margin-top: 10px;
    flex-wrap: wrap;
}
.post-actions button {
    background: transparent;
    border: none;
    color: var(--bs-primary);
    cursor: pointer;
    padding: 6px 10px;
    font-size: 0.85em;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
}
.post-actions button:hover {
    background-color: #f0f0f0;
}

/* ===== YORUM ALANI ===== */
.comments-section {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid #efefef;
}
.comment-input-container {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}
.comment-input-container input,
.comment-input-container textarea {
    flex-grow: 1;
    min-height: 36px;
}
.comment-input-container button {
    padding: 6px 12px;
    color: #fff;
    background-color: var(--bs-primary);
    border: none;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
}
.comment-input-container button:hover {
    background-color: var(--sm-accent-hover);
}

/* ===== SIDEBAR MINI BLOG ===== */
.sidebar-test-card {
    max-width: 100%;
}
.sidebar-test-view {
    cursor: pointer;
    border-radius: 0 0 0.375rem 0.375rem;
}
.sidebar-test-view:focus-visible {
    outline: 2px solid rgba(26, 172, 157, 0.4);
    outline-offset: 2px;
}
.sidebar-test-block-view {
    margin-bottom: 0.75rem;
}
.sidebar-test-block-view:last-child {
    margin-bottom: 0;
}
.sidebar-test-text {
    white-space: pre-wrap;
    word-break: break-word;
}
.sidebar-test-media-wrap {
    margin-top: 0.5rem;
    max-width: 100%;
    border-radius: 0.25rem;
    overflow: hidden;
    background: #f0f2f5;
    line-height: 0;
}
.sidebar-test-media-wrap img {
    max-width: 100%;
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}
.sidebar-test-edit-block {
    border: 1px dashed #dee2e6;
    border-radius: 0.375rem;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    background: #fafbfc;
}
.sidebar-test-edit-block textarea {
    max-width: 100%;
    resize: vertical;
    min-height: 4rem;
}

/* ===== FORM GENEL ===== */
.form-container {
    max-width: 100%;
    margin: 20px auto;
    padding: 16px;
    background-color: #fff;
    border: 1px solid #e4e6eb;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* ===== PROFIL SAYFASI ===== */
.profile-cover-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.profile-picture-round {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* ===== INLINE EDIT IKONLARI ===== */
.profile-edit-icon,
.profile-save-icon,
.profile-cancel-icon {
    cursor: pointer;
    font-size: 0.9em;
}

/* ===== BUTONLAR ===== */
.btn-primary {
    color: #fff;
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
}
.btn-primary:hover {
    background-color: var(--sm-accent-hover);
    border-color: var(--sm-accent-active);
}
.btn-primary:focus {
    box-shadow: 0 0 0 0.2rem rgba(26, 172, 157, 0.45);
}

/* ===== FOOTER ===== */
footer {
    padding: 16px 0;
    margin-top: 20px;
    border-top: 1px solid #e4e6eb;
    font-size: 0.85em;
}

/* ===== RANGE / CHECKBOX / RADIO ===== */
input[type="range"],
input.form-range {
    accent-color: var(--bs-primary);
}
.form-check-input:focus {
    border-color: #6ed4c9 !important;
    box-shadow: 0 0 0 0.25rem rgba(26, 172, 157, 0.28) !important;
}
.form-check-input:checked,
.form-check-input:checked:focus {
    background-color: var(--bs-primary) !important;
    border-color: var(--bs-primary) !important;
}

/* ===== DELETE POST ===== */
.delete-post-button {
    color: #fff;
    background-color: #dc3545;
    border-color: #dc3545;
    border-radius: 4px;
    padding: 4px 8px;
    font-size: 0.8em;
    cursor: pointer;
}
.delete-post-button:hover {
    background-color: #c82333;
}

/* ===== GUEST SAYFASI ===== */
.guest-container {
    padding: 20px 12px;
    text-align: center;
}

/* ============================================
   TABLET (min-width: 576px)
   ============================================ */
@media (min-width: 576px) {
    body {
        font-size: 14px;
    }
    .form-container {
        max-width: 420px;
    }
    .timeline-banner-container {
        border-radius: 8px;
    }
    .timeline-banner-container .profile-cover-photo {
        height: 160px;
    }
    .color-box {
        width: 22px;
        height: 22px;
    }
}

/* ============================================
   TABLET LANDSCAPE / SMALL DESKTOP (min-width: 768px)
   ============================================ */
@media (min-width: 768px) {
    body {
        font-size: 15px;
    }
    .top-nav .nav-icon {
        width: 24px;
        height: 24px;
    }
    .navbar-brand img.logo-icon {
        width: 32px;
        height: 32px;
        margin-right: 8px;
    }
    .timeline-banner-container {
        min-height: 180px;
    }
    .timeline-banner-container .profile-cover-photo {
        height: 180px;
    }
    .timeline-banner-container .position-absolute img.rounded-circle,
    .timeline-banner-container .position-absolute img.profile-picture-round {
        width: 112px;
        height: 112px;
        border: 4px solid white;
    }
    .user-name-bar {
        margin-top: 60px;
        padding-left: 16px;
    }
    .user-name-bar .fw-bold {
        font-size: 1.3rem;
    }
    .form-container {
        max-width: 500px;
        padding: 20px;
    }
    .post-avatar,
    #timeline-posts img.rounded-circle {
        width: 40px;
        height: 40px;
    }
    .color-box {
        width: 20px;
        height: 20px;
    }
}

/* ============================================
   DESKTOP (min-width: 992px)
   ============================================ */
@media (min-width: 992px) {
    .container-fluid {
        max-width: 1200px;
        margin: 0 auto;
    }
    .col-md-3 {
        padding-left: 12px;
        padding-right: 12px;
    }
    .col-md-6 {
        padding-left: 12px;
        padding-right: 12px;
    }
    .form-container {
        max-width: 600px;
    }
    .profile-sidebar-container {
        position: sticky;
        top: 70px;
    }
    .sidebar-container {
        position: sticky;
        top: 70px;
    }
}

/* ============================================
   LARGE DESKTOP (min-width: 1200px)
   ============================================ */
@media (min-width: 1200px) {
    .container-fluid {
        max-width: 1320px;
    }
}
