/* light.css */

/* ==================== 1. BASE & COMMON STYLES ==================== */
body {
    background-color: #f8f9fa;
    color: #212529;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Specific body overrides to prevent layout breaks */
body.auth-page {
    align-items: center;
    padding-top: 40px;
}

body.messenger-page {
    height: 100vh;
    margin: 0;
    overflow: hidden;
}

/* ==================== 2. NAVBAR & FOOTER ==================== */
.navbar {
    background-color: #ffffff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}
.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
}
.navbar-brand svg {
    margin-right: 8px;
    color: #4a6cf7;
}
.nav-link {
    color: #4a6cf7 !important;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    margin: 0 5px;
}
.nav-link:hover {
    background-color: #eef2fd;
    color: #3a56d4 !important;
}
.nav-item {
    margin: 0 5px;
}
.navbar-nav {
    justify-content: center;
}
.navbar-toggler {
    border-color: #dee2e6;
}
.navbar-toggler-icon {
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba(33, 37, 41, 0.7)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}
.footer {
    background-color: #ffffff;
    border-top: 1px solid #eee;
    padding: 1rem 0;
    color: #6c757d;
    font-size: 0.9rem;
}

/* ==================== 3. SHARED COMPONENTS ==================== */
.btn-primary {
    background-color: #4a6cf7;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
}
.btn-outline-primary {
    border-color: #4a6cf7;
    color: #4a6cf7;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
}
.form-control {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 0.75rem 1rem;
}

/* ==================== 4. AUTH PAGE (login-register.html) ==================== */
body.auth-page .btn-primary {
    width: 100%;
    padding: 0.75rem;
}
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    max-width: 450px;
    width: 100%;
}
.card-header {
    background: white;
    border-bottom: none;
    padding: 1.5rem;
}
.nav-tabs {
    border-bottom: none;
}
.nav-tabs .nav-link {
    border: none;
    padding: 0.75rem 1.5rem;
}
.nav-tabs .nav-link.active {
    border-bottom: 2px solid #4a6cf7;
}

/* ==================== 5. PROFILE PAGE (profile.html) ==================== */
.profile-header {
    text-align: center;
    margin-bottom: 2rem;
}
.avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background-color: #e9ecef;
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.profile-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 1.5rem 0;
}
.stat-item {
    text-align: center;
}
.stat-value {
    font-weight: bold;
    font-size: 1.2rem;
}
.profile-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.posts-section {
    margin-top: 2rem;
}
.post-card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}
.post-image {
    height: 200px;
    background-color: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.5rem;
}

/* Profile scoped post-actions */
body.profile-page .post-actions {
    display: flex;
    justify-content: space-between;
    padding: 0 0.75rem 0.75rem;
    font-size: 0.85rem;
}
body.profile-page .post-actions svg {
    margin-right: 3px;
}

/* ==================== 6. SEARCH PAGE (search.html) ==================== */
.search-container {
    max-width: 800px;
    margin: 2rem auto;
    padding: 0 1rem;
}
.search-input {
    position: relative;
    margin-bottom: 2rem;
}
.search-input input {
    width: 100%;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
}

.search-input input:focus {
    border-color: #4a6cf7 !important;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(74, 108, 247, 0.25);
}

.search-input svg {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: #4a6cf7;
}
.search-results {
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
}
.search-results h2 {
    margin-bottom: 1.5rem;
    font-weight: 600;
}
.search-item {
    padding: 1rem 0;
    border-bottom: 1px solid #e9ecef;
}
/* NOTE: Further search rules will be added in follow-up */

/* ==================== 7. MESSENGER PAGE (messager.html) ==================== */
.message-input {
    padding: 1rem;
    border-top: 1px solid #e9ecef;
    background-color: white;
    flex-shrink: 0;
}
.message-input input {
    border-radius: 20px;
    padding: 0.5rem 1rem;
    border: 1px solid #e9ecef;
    margin-right: 0.5rem;
    width: 100%;
}
.message-input button {
    border-radius: 20px;
    padding: 0.5rem 1rem;
}
.chat-container {
    display: flex;
    flex-direction: column;
    height: 100%;
    flex-grow: 1;
    overflow: hidden;
}
.chat-messages {
    overflow-y: auto;
    flex-grow: 1;
    min-height: 0;
    padding: 1rem;
}
.chat-header {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid #e9ecef;
    display: flex;
    align-items: center;
}
.chat-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #e9ecef;
    color: #4a6cf7;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
}
.chat-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.5rem 0;
}
.message-item {
    max-width: 80%;
    padding: 0.75rem 1rem;
    border-radius: 18px;
    margin-bottom: 0.5rem;
    position: relative;
}
.user-message {
    background-color: #e9ecef;
    align-self: flex-start;
    border-top-left-radius: 4px;
}
.other-message {
    background-color: #4a6cf7;
    color: white;
    align-self: flex-end;
    border-top-right-radius: 4px;
}
/* NOTE: Further messenger rules will be added in follow-up */

/* ==================== 8. POST PAGE (post.html) ==================== */
.post-container {
    max-width: 1200px;
    margin: 2rem auto;
    display: flex;
    gap: 2rem;
}
.post-content {
    flex: 1;
}
.post-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}
.post-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #e9ecef;
    margin-right: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.post-user {
    font-weight: 600;
    color: #4a6cf7;
    text-decoration: none;
}
.post-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 1rem 0;
}
.post-description {
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

/* Post scoped post-actions */
body.post-page .post-actions {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding: 0.5rem 0;
    border-top: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
}
body.post-page .post-actions div {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #4a6cf7;
}

.comments-section {
    flex: 1;
    background-color: #ffffff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}
.comments-header {
    margin-bottom: 1.5rem;
}
.comments-list {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 1rem;
}
.comment {
    display: flex;
    margin-bottom: 1.5rem;
}
.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #e9ecef;
    margin-right: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}
.comment-content {
    flex: 1;
}
.comment-name {
    font-weight: 600;
}
.comment-text {
    line-height: 1.5;
    margin-bottom: 0.5rem;
}
.comment-time {
    font-size: 0.8rem;
    color: #6c757d;
}
.comment-input {
    display: flex;
    gap: 0.5rem;
    margin-top: 1.5rem;
}
.comment-input input {
    flex: 1;
    border: 1px solid #e9ecef;
    border-radius: 8px;
}
/* NOTE: Further post rules will be added in follow-up */
