﻿/* Import theme colors from tsr-components.css */
/* This ensures consistency across all stylesheets */

:root {
    /* Light Mode (matches tsr-components.css) */
    --text-primary: #1a1a1a;
    --text-secondary: #4b5563;
    --text-muted: #6b7280;
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --border-color: #e5e7eb;

    --radius: 12px;
    --radius-sm: 8px;
    --color-border: #e5e5e5;
    --color-text: var(--text-primary);
    --color-muted: var(--text-muted);
    --color-primary: #007bff;
    --color-bg: var(--bg-primary);
}

/* Ensure web content respects the iOS notch / safe area on modern and older Safari
   'constant()' is an older syntax; 'env()' is the modern one. Keep both for broad support. */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;

    /* legacy iOS syntax */
    padding-top: constant(safe-area-inset-top, 0px);
    padding-right: constant(safe-area-inset-right, 0px);
    padding-bottom: constant(safe-area-inset-bottom, 0px);
    padding-left: constant(safe-area-inset-left, 0px);

    /* modern syntax (takes precedence where supported) */
    padding-top: env(safe-area-inset-top, 0px);
    padding-right: env(safe-area-inset-right, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
    padding-left: env(safe-area-inset-left, 0px);
}

/* Keep header-specific adjustments in case a different header element needs extra spacing */
header {
    padding-top: constant(safe-area-inset-top, 0px);
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: constant(safe-area-inset-bottom, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

body {
    /* body already gets global safe-area padding, keep a defensive rule here */
    padding-top: constant(safe-area-inset-top, 0px);
    padding-top: env(safe-area-inset-top, 0px);
    padding-bottom: constant(safe-area-inset-bottom, 0px);
    padding-bottom: env(safe-area-inset-bottom, 0px);
}

.your-fixed-header-class {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    /* Adds necessary padding so text doesn't hide behind the notch */
    padding-top: env(safe-area-inset-top, 0px);
    /* Make sure to adjust your element's total height if using border-box */
    box-sizing: border-box;
}


/* Mobile-only: hide button text */
/*@media (max-width: 600px) {
    .user-detail-actions .btn span,
    #followBtnText,
    #friendBtn span {
        display: none;
    }

    .user-detail-actions .btn,
    #followUserBtn,
    #friendBtn {
        padding: 10px;*/ /* tighten spacing for icon-only buttons */
    /*}

        .user-detail-actions .btn i,
        #followUserBtn i,
        #friendBtn i {
            font-size: 1.4rem;*/ /* make icons look clean on mobile */
        /*}
}*/

/*@media (max-width: 600px) {
    .user-detail-actions form button {
        font-size: 0;*/ /* hides text */
    /*}

        .user-detail-actions form button i {
            font-size: 1.4rem;
        }
}*/












.tsr-feed-item {
    background: var(--tsr-surface);
    border: 1px solid rgba(255,255,255,0.05);
    padding: 1.5rem;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
}

.tsr-feed-avatar {
    width: 48px;
    height: 48px;
    border-radius: 9999px;
    object-fit: cover;
}



.tsr-profile-header {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 1.5rem;
    background: var(--tsr-surface);
    border-radius: 0.75rem;
    border: 1px solid rgba(255,255,255,0.05);
}

.tsr-profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 9999px;
    object-fit: cover;
    border: 2px solid var(--tsr-accent);
}


.tsr-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.tsr-modal {
    background: var(--tsr-surface);
    border: 1px solid rgba(255,255,255,0.08);
    padding: 2rem;
    border-radius: 0.75rem;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}


.tsr-section-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--tsr-text-primary);
    margin-bottom: 1rem;
    letter-spacing: 0.3px;
}

.tsr-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--tsr-glass);
    color: var(--tsr-text-primary);
    border-radius: 0.5rem;
    border: 1px solid rgba(255,255,255,0.05);
    transition: 150ms;
}

    .tsr-input::placeholder {
        color: var(--tsr-text-secondary);
    }

    .tsr-input:focus {
        outline: none;
        border-color: var(--tsr-accent);
        box-shadow: 0 0 0 2px rgba(139,92,246,0.3);
    }


.tsr-card {
    background: var(--tsr-surface);
    border: 1px solid rgba(255,255,255,0.05);
    padding: 1.5rem;
    border-radius: 0.75rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}


.tsr-nav-item {
    display: block;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    color: var(--tsr-text-secondary);
    transition: 150ms;
}

    .tsr-nav-item:hover {
        background: var(--tsr-glass);
        color: var(--tsr-text-primary);
    }

.tsr-dropdown-item {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--tsr-text-secondary);
    transition: 150ms;
}

    .tsr-dropdown-item:hover {
        background: var(--tsr-glass);
        color: var(--tsr-text-primary);
    }

.tsr-btn {
    padding: 0.6rem 1.2rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: 150ms;
}

.tsr-btn-primary {
    background: var(--tsr-accent);
    color: white;
}

    .tsr-btn-primary:hover {
        background: #7c3aed;
    }

.tsr-btn-glass {
    background: var(--tsr-glass);
    color: var(--tsr-text-primary);
    backdrop-filter: blur(6px);
}

    .tsr-btn-glass:hover {
        background: rgba(255,255,255,0.08);
    }

.tsr-btn-ghost {
    background: transparent;
    color: var(--tsr-text-secondary);
}

    .tsr-btn-ghost:hover {
        color: var(--tsr-text-primary);
        background: var(--tsr-glass);
    }




.feed-container {
    max-width: 650px;
    margin: 0 auto;
    padding: 20px 0;
}
/*.post-card {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 15px;
    margin-bottom: 25px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.post-header {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
    gap: 12px;
}

.post-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
}

.post-user-info {
    display: flex;
    flex-direction: column;
}

.post-user-name {
    font-weight: 600;
    font-size: 15px;
}

.post-date {
    font-size: 12px;
    color: var(--color-muted);
}

.post-private-icon {
    margin-left: auto;
    font-size: 18px;
}

.post-caption {
    font-size: 15px;
    margin-bottom: 12px;
    line-height: 1.4;
    white-space: pre-wrap;
}
*/
.carousel-wrapper {
    position: relative;
}

.carousel {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    gap: 1px;
    padding-bottom: 6px;
}

    .carousel::-webkit-scrollbar {
        display: none;
    }

.carousel-item {
    flex: 0 0 100%;
    scroll-snap-align: center;
}

.carousel-image {
    width: 100%;
    border-radius: var(--radius);
    user-select: none;
    pointer-events: none;
    filter: blur(12px);
    transform: scale(1.05);
    transition: filter 0.4s ease, transform 0.4s ease;
}

    .carousel-image.loaded {
        filter: blur(0);
        transform: scale(1);
    }

.carousel-dots {
    display: flex;
    justify-content: center;
    margin-top: 8px;
    gap: 6px;
}

    .carousel-dots .dot {
        width: 8px;
        height: 8px;
        background: #ccc;
        border-radius: 50%;
        transition: background 0.2s ease, transform 0.2s ease;
    }

        .carousel-dots .dot.active {
            background: #333;
            transform: scale(1.3);
        }

.repost-block {
    background: #f7f7f7;
    border-radius: var(--radius-sm);
    padding: 12px;
    margin-bottom: 12px;
}

.post-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.action-btn,
.like-btn,
.favorite-btn,
.comment-btn,
.repost-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    transition: transform 0.15s ease;
}

    .action-btn:hover,
    .like-btn:hover,
    .favorite-btn:hover,
    .comment-btn:hover,
    .repost-btn:hover {
        transform: scale(1.15);
    }

    .like-btn.active {
        color: #e63946;
    }

    .favorite-btn.active {
        color: #ffb703;
    }

.post-comments {
    margin-top: 10px;
}

.comment {
    display: flex;
    align-items: center;
    margin-bottom: 6px;
}

.comment-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 8px;
}

.comment-user {
    font-weight: 600;
    margin-right: 6px;
    font-size: 14px;
}

.comment-text {
    font-size: 14px;
    color: #444;
}

.view-all-comments {
    font-size: 13px;
    color: var(--color-primary);
    text-decoration: none;
}

    .view-all-comments:hover {
        text-decoration: underline;
    }

.comment-form {
    margin-top: 10px;
}

.comment-input {
    width: 100%;
    padding: 8px 12px;
    border-radius: 20px;
    border: 1px solid #ddd;
    font-size: 14px;
}

.comment-submit {
    background: var(--color-primary);
    color: #fff;
    border: none;
    padding: 7px 14px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
}

.profile-header {
    width: 100%;
    margin-bottom: 20px;
}

.profile-cover-wrapper {
    width: 100%;
    height: 180px;
    overflow: hidden;
    border-radius: 0 0 12px 12px;
}

.profile-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-avatar-wrapper {
    margin-top: -60px;
    padding-left: 16px;
}

.profile-avatar {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 4px solid white;
    object-fit: cover;
}

.profile-info {
    padding: 12px 16px;
}

.profile-fullname {
    font-size: 1.4rem;
    font-weight: 700;
}

.profile-username {
    color: #777;
    font-size: 0.95rem;
}

.profile-bio {
    margin-top: 8px;
    font-size: 0.95rem;
    color: #444;
}

.profile-stats {
    display: flex;
    gap: 20px;
    margin-top: 12px;
    font-size: 0.95rem;
}

.profile-action {
    margin-top: 14px;
}

.profile-follow-btn,
.profile-edit-btn {
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid #ccc;
    background: #f5f5f5;
    cursor: pointer;
    font-weight: 600;
}

.profile-tabs {
    display: flex;
    justify-content: space-around;
    margin-top: 20px;
    border-top: 1px solid #ddd;
    padding-top: 10px;
}

    .profile-tabs a {
        text-decoration: none;
        color: #555;
        padding: 8px 12px;
        font-weight: 600;
    }

        .profile-tabs a.active {
            color: black;
            border-bottom: 2px solid black;
        }

.profile-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.profile-post-tile {
    position: relative;
    display: block;
}

.profile-post-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 100%;
    overflow: hidden;
    border-radius: 8px;
}

.profile-post-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-post-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.35);
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    opacity: 0;
    transition: 0.2s ease;
}

.profile-post-tile:hover .profile-post-overlay {
    opacity: 1;
}

.multi-image-icon {
    position: absolute;
    top: 6px;
    right: 6px;
    background: rgba(0,0,0,0.55);
    color: white;
    padding: 4px 6px;
    border-radius: 4px;
    font-size: 0.8rem;
}

.clips-feed {
    height: 100vh;
    overflow-y: scroll;
    scroll-snap-type: y mandatory;
}

.clip-item {
    position: relative;
    height: 100vh;
    scroll-snap-align: start;
}

.clip-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.clip-overlay {
    position: absolute;
    bottom: 40px;
    left: 20px;
    color: white;
}

.clip-actions {
    position: absolute;
    right: 20px;
    bottom: 40px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

    .clip-actions button {
        background: none;
        border: none;
        color: white;
        font-size: 28px;
    }


