/* 
POSTS PAGE STYLES
*/

@import url('https://fonts.googleapis.com/css2?family=Afacad:wght@400;500;600;700&display=swap');

/* CSS Variables for consistent theming */
:root {
    --sidebar-bg: #0A0F65;
    --accent-yellow: #fdbb22;
    --accent-orange: #d63f04;
    --muted-blue: #ADCFE4;
    --text-dark: #0a0f65;
    --muted-text: #506592;
    --body-bg: #d9f2ff;
    --card-bg: #fff;
    --white: #ffffff;
    --border: rgba(10, 15, 101, 0.54);
    --radius: 8px;
}

/* Global reset for posts page */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
}

/* Base body styles - sets the foundation for all text sizing */
body {
    background: var(--body-bg);
    color: var(--text-dark);
    font-family: 'Afacad', 'ABeeZee', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
}

/* SIDEBAR NAVIGATION*/
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    width: 240px;
    background: var(--sidebar-bg);
    display: flex;
    flex-direction: column;
}

.sidebar .logo {
    padding: 24px;
    color: var(--white);
    font-size: 32px;
    font-weight: 700;
    font-family: 'Poppins', sans-serif;
}

.sidebar .nav {
    padding: 8px 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* Navigation links in sidebar - each menu item */
.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 40px;
    padding: 0 16px;
    color: var(--white);
    text-decoration: none;
    border-radius: 28px;
    transition: background .18s;
    width: 100%;
    font-size: 18px;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
    background: var(--accent-yellow);
    color: var(--text-dark);
}

.sidebar .profile-mini {
    padding: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: auto;
}

.profile-mini-inner {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px;
}

.profile-mini img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.profile-mini-name {
    color: var(--white);
    font-size: 15px;
    font-weight: 500;
}

.profile-mini-handle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 14px;
}

.main {
    margin-left: 240px;
    width: calc(100vw - 240px);
    min-height: 100vh;
    position: relative;
    background: var(--body-bg);
}

.posts-page-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.posts-content {
    position: relative;
    width: 100%;
    margin: 0 auto;
    padding: 1rem 0;
}

.nav-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-icon svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

/* POST TABS SECTION */
.posts-tabs-container {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    margin-top: 50px;
    margin-bottom: 2.5rem;
    z-index: 1;
}

.posts-tabs {
    position: relative;
    width: 862px;
    display: flex;
    justify-content: center;
}

.posts-tab-list {
    position: relative;
    display: flex;
    gap: 0;
    background: var(--sidebar-bg);
    border-radius: 50px;
    padding: 4.14px;
    width: 862px;
    height: 40.717px;
}

/* Individual tab button (Posts, Province, Gear)
   Text size matches sidebar navigation for consistency */
.posts-tab {
    position: relative;
    z-index: 2;
    padding: 8px 24px;
    border-radius: 50px;
    background: transparent;
    cursor: pointer;
    font-size: 18px;
    font-family: 'Chillax', 'Afacad', sans-serif;
    font-weight: 500;
    color: var(--white);
    flex: 1;
    text-align: center;
    transition: color 0.2s;
    line-height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.posts-tab.active {
    color: var(--text-dark);
    /* font-size: 1.4rem;
    font-weight: bolder; */
}

.posts-tab-list::after {
    content: '';
    position: absolute;
    left: 4.14px;
    top: 4.14px;
    width: var(--pill-width, 271.113px);
    height: 32.772px;
    background: var(--body-bg);
    border-radius: 50px;
    transition: transform 0.3s ease, width 0.3s ease;
    transform: var(--pill-transform, translateX(0px));
    z-index: 1;
}

.chevron-icon {
    transition: transform 0.3s ease;
    color: currentColor;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.chevron-icon.rotated {
    transform: rotate(180deg);
}

.posts-dropdown-menu {
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%);
    border-radius: 15px;
    background: var(--white);
    box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.25);
    width: 271px;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 5;
    pointer-events: none;
    margin-top: 0;
}

.posts-dropdown-menu.open {
    max-height: 367px;
    opacity: 1;
    padding: 20px 16px;
    overflow-y: auto;
    pointer-events: all;
}

.province-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.province-item {
    color: var(--text-dark);
    text-align: center;
    font-family: 'Chillax', 'Afacad', sans-serif;
    font-size: 16px;
    font-weight: 500;
    line-height: 20px;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 8px;
    margin-bottom: 4px;
}

.province-item:hover {
    background: #DCEBF4;
    border-radius: 90px;
}

.province-item.selected {
    background: #DCEBF4;
    font-weight: 500;
    border-radius: 90px;
}

/* Post Detail Styles */
.top-bar {
    width: 862px;
    max-width: 100%;
    margin: 0 auto;
    background: var(--white);
    border-radius: 24px;
    padding: 14px 28px;
    margin-bottom: 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.top-bar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.top-bar h2 {
    font-size: 28px;
    font-weight: 600;
    color: #1a1a1a;
    padding-bottom: 7px;
    width: 65%;
}

.coordinates {
    font-size: 18px;
    color: #999;
    text-align: end;
}

.gradient-line {
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #FF8C42 0%, #FF6B42 50%, #FFB366 100%);
    margin-bottom: 6px;
    border-radius: 2px;
}

.weather-bar {
    display: flex;
    gap: 28px;
}

.weather-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.weather-item svg {
    flex-shrink: 0;
}

.weather-item span {
    font-size: 24px;
    font-weight: 600;
    color: #333;
}

.weather-bar-detail {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
}

/* POST CONTAINER */
.post-container {
    display: flex;
    gap: 14px;
    justify-content: center;
    align-items: flex-start;
    width: 862px;
    max-width: 100%;
    margin: 0 auto 40px auto;
}

/* Post Image */
.post-image {
    width: 503px;
    height: 532px;
    background: var(--white);
    padding: 6px;
    border-radius: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 18px;
}

/* Right Section */
.post-right {
    width: 345px;
    height: 532px;
    height: 532px;
    display: flex;
    flex-direction: column;
}

/* Description */
.post-description {
    height: 232px;
    background: var(--white);
    border-radius: 24px 24px 0 0;
    padding: 18px 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.user-header {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.user-header img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.user-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0;
    padding: 0;
    line-height: 1.3;
}

.user-header p {
    font-size: 14px;
    color: #333;
    margin: 0;
    padding: 0;
    line-height: 1.3;
    margin-top: 2px;
}

/* Author name and handle links - clickable to go to profile */
.user-header .author-name-link,
.user-header .author-handle-link {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.user-header .author-name-link:hover,
.user-header .author-handle-link:hover {
    color: var(--accent-orange);
    text-decoration: underline;
}

.user-header .author-name-link:visited,
.user-header .author-handle-link:visited {
    color: inherit;
}

.post-text {
    font-size: 15px;
    line-height: 1.5;
    color: #1a1a1a;
    font-weight: 500;
    margin-bottom: 10px;
}

.hashtags {
    display: none;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.hashtags a {
    color: var(--border-hex);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
}

.timestamp {
    font-size: 14px;
    color: #A0C4D8;
}

/* COMMENTS SECTION */
.post-comments {
    height: 300px;
    background: #AED8F3;
    border-radius: 0 0 24px 24px;
    padding: 16px 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    overflow: hidden;
}

/* ACTION BUTTONS (Like, Comment, Share, Bookmark) */
.action-buttons {
    display: flex;
    gap: 6px;
    margin-bottom: 10px;
    flex-shrink: 0;
    flex-shrink: 0;
}

.action-buttons button {
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.like-btn {
    background-color: transparent;
}

.like-btn.liked svg path {
    fill: #B50000 !important;
    stroke: #B50000 !important;
}

.like-btn:not(.liked) svg path {
    fill: transparent;
    stroke: #B50000;
}

.like-count {
    font-size: 12px;
    font-weight: 600;
    color: #0A0F65;
    align-self: center;
    margin-left: 2px;
}

.comment-btn {
    background-color: transparent;
}



.share-btn {
    background-color: transparent;
}

/* Bookmark button */
.bookmark-btn {
    background-color: transparent;
    margin-left: auto;
}

/* COMMENTS LIST - SCROLLABLE CONTAINER */
.comments-list {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    margin-bottom: 14px;
    min-height: 0;
}

/* CUSTOM SCROLLBAR STYLING */
.comments-list::-webkit-scrollbar {
    width: 6px;
}

.comments-list::-webkit-scrollbar-track {
    background: transparent;
}

.comments-list::-webkit-scrollbar-thumb {
    background: #0a0f65;
    border-radius: 3px;
}

.comments-list::-webkit-scrollbar-thumb:hover {
    background: rgba(47, 150, 235, 0.6);
}

.comment {
    border-radius: 16px;
    padding: 6px 10px;
    padding-left: 0px;
    display: flex;
    gap: 6px;
}

.comment>a {
    display: block;
    flex-shrink: 0;
    line-height: 0;
}

.comment img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid white;
    object-fit: cover;
    display: block;
}

.comment-bubble {
    background: var(--white);
    border-radius: 12px;
    padding: 8px 12px;
    flex: 1;
}

.comment-bubble strong {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a1a;
}

.comment-bubble strong a {
    color: inherit;
    text-decoration: none;
}

.comment-bubble strong a:hover {
    text-decoration: underline;
}

.comment-bubble p {
    font-size: 14px;
    line-height: 1.4;
    color: #4E7EBF;
    margin-top: 3px;
}

.comment-bubble .comment-time {
    display: block;
    font-size: 11px;
    color: #999;
    margin-top: 4px;
    font-style: italic;
}

.user-bio {
    font-size: 13px;
    color: #666;
    margin-top: 4px;
    line-height: 1.4;
    font-style: italic;
}

.divider {
    display: none;
}

.add-comment {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
    width: 95%;
}

.add-comment img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid white;
    object-fit: cover;
    flex-shrink: 0;
    display: block;
}

.input-wrapper {
    flex: 1;
    background: var(--white);
    border-radius: 10px;
    padding: 6px 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.input-wrapper input {
    flex: 1;
    border: none;
    background: transparent;
    font-size: 14px;
    color: #333;
    outline: none;
}

.input-wrapper input::placeholder {
    color: #4E7EBF;
}

.row>div img {
    margin-left: 2rem;
}

.location-weather-section {
    margin-top: 15px;
    margin-bottom: 15px;
}

.location-weather-content {
    width: 100%;
    padding: 2rem;
    background: var(--card-bg);
    border-radius: 2rem;
    margin: .2rem;
    padding-top: 1rem;
    box-shadow: 5px 2px 18px 0px #0000000d;
}

.location-weather-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 auto;
}

.location-weather-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 12px;
}

.location-field,
.coordinates-field,

.weather-field {
    display: flex;
    flex-direction: column;
}

.location-field label,
.coordinates-field label,
.weather-field label {
    font-size: 14px;
    font-weight: 500;
    color: var(--muted-text);
    margin-bottom: 6px;
}

.location-field input,
.coordinates-field input,
.weather-field input,
.weather-field select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    color: var(--text-dark);
    background: var(--white);
    font-family: inherit;
    transition: border-color 0.2s;
}

.location-field input:focus,
.coordinates-field input:focus,
.weather-field input:focus,
.weather-field select:focus {
    outline: none;
    border-color: var(--accent-yellow);
}

.location-field input::placeholder,
.coordinates-field input::placeholder,
.weather-field input::placeholder {
    color: var(--muted-text);
    opacity: 0.6;
}

.coordinates-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 6px;
}

.location-btn {
    padding: 6px 12px;
    font-size: 14px;
    background: var(--accent-yellow);
    color: var(--text-dark);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s;
    font-family: inherit;
}

.location-btn:hover {
    background: #e6a91f;
}

.weather-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
}


@media (max-width:1000px) {
    .sidebar {
        display: none;
    }

    .main {
        margin-left: 0;
    }

    .location-weather-grid {
        grid-template-columns: 1fr;
    }

    .weather-grid {
        grid-template-columns: 1fr;
    }
}

#wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 400px;
}

@keyframes slideIn {
    0% {
        transform: translateY(100px);
        animation-timing-function: ease-out;
    }

    60% {
        transform: translateY(-20px);
        animation-timing-function: ease-in;
    }

    80% {
        transform: translateY(-10px);
        animation-timing-function: ease-out;
    }

    100% {
        transform: translateY(0px);
        animation-timing-function: ease-in;
    }
}

@keyframes fadeIn {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

/* The Modal (background) */
.modal {
    display: none;
    display: none;
    position: fixed;
    z-index: 2;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
}

/* Modal Content/Box */
.modal-content {
    position: absolute;
    left: 27.5rem;
    background-color: #ffffff;
    margin: 9% auto;
    border-radius: 1rem;
    width: 60%;
    width: 60%;
    background-image: url(../img/profile-bg.png);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: bottom;
    background-color: var(--body-bg);
    animation: fadeIn .35s, slideIn .35s ease-in-out;
}


/* The Close Button */
.close {
    color: var(--sidebar-bg);
    float: right;
    margin-top: 1rem;
    margin-right: 1rem;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

#post_creator {
    margin-bottom: 3rem;
    position: relative;
    max-width: 960px;
    margin: 0 auto;
    padding: 1rem;
    margin-top: 3rem;
}

.post_composer h2 {
    font-family: 'Chillax Variable';
    font-weight: 500;
    text-align: center;
    margin-top: -0.5rem;
    margin-bottom: 2rem;
}

/* Hidden utility class */
.hidden {
    display: none;
}

/* Gear Empty State */
.gear-empty-state {
    text-align: center;
    padding: 60px 20px;
}

.gear-empty-title {
    font-size: 3.2rem;
    font-weight: 600;
    color: #0a0f65;
    margin-bottom: 16px;
    font-family: 'Chillax Variable';
}

.gear-empty-text {
    font-size: 1.5rem;
    color: #0a0f65;
    margin: 0;
    font-family: 'Chillax Variable';
}