@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    --bg-main: #f1f5f9;
    --text-dark: #0f172a;
    --text-muted: #1e293b;
    --card-bg: #ffffff;
    --blue-gradient: linear-gradient(135deg, #0ea5e9, #2563eb);
    --teal-gradient: linear-gradient(135deg, #14b8a6, #0f766e);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
}

body {
    background: linear-gradient(135deg, #d94426 0%, #a81a58 100%);
    color: var(--text-dark);
}

.container {
    max-width: 800px;
    margin: 0 auto;
}

.header {
    text-align: center;
    margin-bottom: 2rem;
}

.header h1 {
    font-size: 2.5rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 1rem;
}

/* Toggle */
.feed-toggle {
    display: flex;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    padding: 0.3rem;
    
    margin: 0 auto 2rem auto;
}

.feed-toggle button {
    flex: 1;
    padding: 0.75rem;
    border: none;
    background: transparent;
    border-radius: 10px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s ease;
}

.feed-toggle button.active {
    background: white;
    color: #0f172a;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

/* Feed Grid */
.feed-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

/* Card */
.post-card {
    background: rgba(255, 255, 255, 0.90) !important;
    backdrop-filter: blur(10px);
    border: 2px solid var(--border-subtle);
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease;
}

.post-card:hover {
    transform: translateY(-3px);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 1rem;
}

.post-type {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.8rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
    color: white;
}

.post-type.rideshare { background: var(--blue-gradient); }
.post-type.accomodation { background: var(--teal-gradient); }
.post-type.jobs { background: linear-gradient(135deg, #10b981 0%, #059669 100%); }
.post-type.friends { background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%); }
.post-type.biz { background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%); }
.post-type.default { background: #64748b; }

.post-date {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.card-body {
    margin-bottom: 1rem;
}

.location-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.location-pill {
    background: var(--bg-glass-input, #f1f5f9);
    color: var(--text-main);
    border: 1px solid var(--border-subtle);
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.price-tag {
    font-size: 1.25rem;
    font-weight: 800;
    color: #10b981;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid #f1f5f9;
}

.contact-btn {
    background: #0f172a;
    color: white;
    text-decoration: none;
    padding: 0.6rem 1.2rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.3s ease;
}

.contact-btn:hover {
    background: #334155;
}

.legacy-body {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
    margin-bottom: 1rem;
}

.loader {
    text-align: center;
    padding: 3rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* User Rating Display */
.user-rating {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.85rem;
    color: #f59e0b; /* Amber */
    font-weight: 700;
    margin-top: 0.25rem;
}

.rate-user-btn {
    background: transparent;
    border: 1px solid #e2e8f0;
    color: var(--text-muted);
    padding: 0.4rem 0.8rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    margin-left: 1rem;
}

.rate-user-btn:hover {
    background: #f1f5f9;
    color: #0f172a;
    border-color: #cbd5e1;
}

/* Modal CSS */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 20px;
    width: 90%;
    max-width: 400px;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
    animation: modalPop 0.3s ease-out;
}

@keyframes modalPop {
    0% { transform: scale(0.95); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
}

.star-rating-input {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 2rem;
    color: #e2e8f0;
    cursor: pointer;
}

.star-rating-input .rating-star.active {
    color: #f59e0b;
}

.star-rating-input .rating-star:hover,
.star-rating-input .rating-star:hover ~ .rating-star {
    color: #fbbf24;
}
/* Reversing the flex direction visually to make CSS hover effect work left-to-right */
.star-rating-input {
    flex-direction: row-reverse;
}
.star-rating-input .rating-star:hover,
.star-rating-input .rating-star:hover ~ .rating-star {
    color: #f59e0b;
}

.rating-textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    resize: none;
    height: 100px;
    font-family: inherit;
    margin-bottom: 1rem;
}

.rating-textarea:focus {
    outline: none;
    border-color: #0ea5e9;
}

.submit-rating-btn {
    width: 100%;
    background: #0f172a;
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.submit-rating-btn:hover {
    background: #334155;
}
/* OP Chatbot Styles */
.chatbot-container {
    position: fixed;
    bottom: 0;
    right: 20px;
    width: 320px;
    background: #fff;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
    z-index: 1000;
    font-family: 'Inter', sans-serif;
    border: 1px solid rgba(0,0,0,0.05);
}

.chatbot-header {
    background: linear-gradient(135deg, #0ea5e9, #2563eb);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    cursor: pointer;
}

.chatbot-header button {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
}

.chatbot-body {
    display: flex;
    flex-direction: column;
    height: 350px;
}

.chat-messages {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.msg {
    max-width: 85%;
    padding: 0.6rem 0.85rem;
    border-radius: 12px;
    font-size: 0.85rem;
    line-height: 1.4;
}

.msg.bot {
    background: #e0f2fe;
    color: #0369a1;
    align-self: flex-start;
    border-bottom-left-radius: 2px;
}

.msg.user {
    background: #2563eb;
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 2px;
}

.chat-input-container {
    display: flex;
    padding: 0.75rem;
    background: white;
    border-top: 1px solid #e2e8f0;
}

.chat-input-container input {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 99px;
    outline: none;
    font-size: 0.85rem;
}

.chat-input-container input:focus {
    border-color: #0ea5e9;
}

.chat-input-container button {
    background: #0ea5e9;
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    margin-left: 0.5rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
}

.btn-alert-subscribe {
    background: #10b981;
    color: white;
    border: none;
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    margin-top: 0.5rem;
    display: inline-block;
}

@media (max-width: 768px) {
    .chatbot-container {
        width: 100%;
        right: 0;
        bottom: 60px; /* Above mobile navbar */
        border-radius: 0;
    }
    .chatbot-header {
        border-radius: 0;
    }
}


/* Hide redundant Global Feed button */
#nav-auth-container a[href*="feed.html"] { display: none !important; }

/* Hide scrollbar for toggle row */
.feed-toggle::-webkit-scrollbar { display: none; }
.feed-toggle { -ms-overflow-style: none; scrollbar-width: none; }




/* Fix feed toggle bar in dark mode */
html.dark-mode .feed-toggle { background: rgba(15, 23, 42, 0.88) !important; border: 1px solid rgba(255, 255, 255, 0.12); }
html.dark-mode .feed-toggle button.active { background: #1e293b !important; color: #f8fafc !important; border: 1px solid rgba(255, 255, 255, 0.1); }
html.dark-mode .feed-toggle button { color: #94a3b8 !important; }




