/* 
 * OnlyRub Platform
 * Main CSS Stylesheet
 */

 /* ======= RESET & BASE STYLES ======= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    background-color: var(--background-primary);
    color: var(--text-primary);
    line-height: 1.5;
    font-size: 16px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-top: 60px;
    padding-bottom: 70px;
}


 :root {
    --background-primary: #000000;
    --background-secondary: #1e1e1e;
    --accent-color: #ff3366;
    --accent: #ff3366;
    --text-primary: #f5f5f5;
    --text-secondary: #b0b0b0;
    --border-color: #333333;
    --border: #333333;
    --bitcoin-color: #f7931a;
    --verification-color: #1DA1F2;
    --warning-bg: #773300;
    --warning-text: #ffcc99;
    --max-content-width: 600px;
}

.btn {
    padding: 8px 16px;
    border-radius: 5px;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border);
}

/* Content container that centers everything */
.content-container {
    width: 100%;
    max-width: var(--max-content-width);
    margin: 0 auto;
    padding: 0;
    position: relative;
}

/* Verification Banner Styles */
.verification-banner {
    background-color: var(--warning-bg);
    color: var(--warning-text);
    padding: 12px 15px;
    position: relative;
    text-align: center;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    border-radius: 5px;
    margin-bottom: 15px;
}

.verification-banner a {
    color: var(--warning-text);
    text-decoration: underline;
    font-weight: 600;
    margin-left: 5px;
}

.verification-banner a:hover {
    text-decoration: none;
}

.verification-banner .close-banner {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    background: transparent;
    border: none;
    color: var(--warning-text);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}

.verification-banner .banner-icon {
    margin-right: 8px;
    flex-shrink: 0;
}

.verification-banner .banner-text {
    flex-grow: 1;
    text-align: left;
}

@media (max-width: 600px) {
    .verification-banner {
        padding: 10px;
        font-size: 0.8rem;
        border-radius: 0;
        margin-bottom: 10px;
    }
    
    .verification-banner .close-banner {
        width: 20px;
        height: 20px;
    }
}

/* Critical fallback styles for feed posts */
.post-card {
    background-color: #1e1e1e;
    margin-bottom: 10px;
    border-bottom: 1px solid #333333;
    width: 100%;
    max-width: 600px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background-color: #000000;
}

.card-image-container {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-like-feed {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    border-bottom: 1px solid #333333;
    background-color: #000000;
}

/* CSS Variables for Consistent Theming */



a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.2s ease;
    border: none;
}

a:hover {
    color: #ff6690;
}

img {
    max-width: 100%;
    height: auto;
}

ul, ol {
    list-style: none;
}

button, .button {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: background-color 0.3s, transform 0.2s;
    text-align: center;
    display: inline-block;
}

button:hover, .button:hover {
    background-color: var(--accent-color);
    transform: translateY(-2px);
}

button:disabled, .button:disabled {
    background-color: #666;
    cursor: not-allowed;
    transform: none;
}

input, textarea, select {
    background-color: var(--background-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 12px 15px;
    border-radius: 8px;
    font-size: 1rem;
    width: 100%;
    transition: border-color 0.3s;
}

input:focus, textarea:focus, select:focus {
    border-color: var(--accent-color);
    outline: none;
}

/* ======= ALERTS ======= */
.alert {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    margin: 70px 15px 20px 15px; /* Increased top margin to clear the header */
    border-radius: 8px;
    font-size: 14px;
    position: relative;
    z-index: 50; /* Ensure it's above other content but below header */
}

.alert svg {
    margin-right: 10px;
    flex-shrink: 0;
}

.alert-danger {
    background-color: rgba(255, 51, 102, 0.1);
    color: var(--error-color);
    border: 1px solid rgba(255, 51, 102, 0.2);
}

.alert-success {
    background-color: rgba(46, 204, 113, 0.1);
    color: #2ecc71;
    border: 1px solid rgba(46, 204, 113, 0.2);
}

.main-container .alert:first-child {
    margin-top: 20px;
}

.auto-hide-message {
    transition: opacity 0.5s ease-out;
}

.fade-out {
    opacity: 0;
}

/* If the header is fixed, ensure this positioning works */
@media (max-width: 768px) {
    .alert {
        margin-top: 60px; /* Slightly less margin on mobile if header is smaller */
    }
}

/* Alternatively, if you're using a container or main-container */
.container .alert:first-of-type,
.main-container .alert:first-of-type,
.content-container .alert:first-of-type {
    margin-top: 70px;
}

/* If using the flash message system on a page with title */
.page-title + .alert {
    margin-top: 15px; /* Less margin if it follows a page title */
}

/* ======= LAYOUT ======= */
.container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 0;
}

.content-container {
    flex: 1;
    padding-bottom: 70px;
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
}

/* Wrapper for desktop layout constraint */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 100%;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    z-index: -1;
    pointer-events: none;
    background-color: var(--background-primary);
}

/* ======= HEADER ======= */
.main-header {
    background-color: var(--background-primary);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
    width: 100%;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
    padding: 0 15px;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 18px;
    font-weight: bold;
    color: var(--text-primary);
}

.logo img {
    height: 40px;
    width: auto;
}

.logo-log-reg img {
    height: 80px;
    width: auto;
}

.back-button {
    color: var(--text-primary);
    margin-right: 15px;
    display: flex;
    align-items: center;
}

.user-menu {
    position: relative;
}

.avatar-container {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--accent-color);
    flex-shrink: 0;
}

.user-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-initial {
    color: white;
    font-weight: bold;
    font-size: 18px;
    text-transform: uppercase;
}

.dropdown-menu {
    position: absolute;
    top: 45px;
    right: 0;
    background-color: var(--background-secondary);
    border-radius: 8px;
    min-width: 180px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 110;
    display: none;
    border: 1px solid var(--border-color);
}

.dropdown-menu.active {
    display: block;
}

.dropdown-menu ul {
    padding: 8px 0;
}

.dropdown-menu ul li a {
    display: block;
    padding: 10px 15px;
    color: var(--text-primary);
    transition: background-color 0.2s;
}

.dropdown-menu ul li a:hover {
    background-color: rgba(255, 51, 102, 0.1);
}

.auth-links {
    display: flex;
    gap: 10px;
}

.login-link {
    color: var(--text-primary);
    font-weight: 500;
}

/* ======= FEED PAGE STYLES ======= */
.feed-header {
    background-color: var(--background-primary);
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
}

.location-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.location-bar h1 {
    font-size: 1.4rem;
    color: var(--text-primary);
}

.change-location {
    color: var(--accent-color);
    font-weight: 500;
}

.featured-providers {
    margin-top: 10px;
}

.featured-providers h2 {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.provider-stories {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 10px;
    -webkit-overflow-scrolling: touch;
}

.provider-story {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    width: 70px;
}

.story-avatar {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--background-primary);
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 5px;
    overflow: hidden;
}

.story-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.story-avatar .avatar-initial {
    color: var(--text-primary);
    font-size: 1.5rem;
    font-weight: bold;
}

.story-avatar .verified-badge {
    position: absolute;
    bottom: 0;
    right: 0;
}

.story-name {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-align: center;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.feed-posts {
    padding: 0px;
}

.post-card {
    background-color: var(--background-secondary);
    margin-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background-color: var(--background-primary);
}

.card-profile {
    display: flex;
    align-items: center;
}

.card-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    background-color: var(--background-primary);
}

.card-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-avatar .avatar-initial {
    color: var(--text-primary);
    font-size: 1.2rem;
    font-weight: bold;
}

.card-user-info {
    display: flex;
    flex-direction: column;
}

.card-name {
    display: flex;
    align-items: center;
    font-weight: 600;
    font-size: 0.9rem;
}

.card-name .verification-badge {
    margin-left: 0px;
}

.function-verification-badge {
    display: inline-flex;
    align-items: center;
    margin-left: 5px;
    color: var(--verification-color);
}

.post-date {
    font-size: 0.7rem;
    color: var(--text-secondary);
}

.featured-tag {
    background-color: var(--accent-color);
    color: white;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 500;
}

.boosted-tag {
    background-color: #8247e5;;
    color: white;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 500;
}

.new-tag {
    background-color: #2ecc71; /* Green color */
    color: white;
    padding: 3px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 500;
    margin-left: 4px;
    display: inline-block;
}

.card-image-container {
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
}

.card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-content {
    padding: 10px 5px;
    background-color: var(--background-primary);
}

.card-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 5px;
    color: var(--text-primary);
}

.card-price {
    color: var(--text-secondary);
    font-size: 0.8rem;
    margin-bottom: 8px;
}

.card-description {
    font-size: 0.9rem;
    color: var(--text-primary);
    margin-bottom: 10px;
    line-height: 1.4;
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 10px;
}

.tag {
    background-color: var(--background-secondary);
    color: var(--text-secondary);
    padding: 3px 8px;
    border-radius: 15px;
    font-size: 0.7rem;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    border-top: 1px solid var(--border-color);
}

.card-like-feed {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--background-primary);
}

.engagement-stats {
    display: flex;
    align-items: center;
    gap: 15px;
}

.stat-group {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--text-secondary);
    cursor: pointer;
}

.stat-group svg {
    stroke: var(--text-secondary);
}

.like-stat.liked svg {
    fill: var(--accent-color);
    stroke: var(--accent-color);
}

.view-details {
    color: var(--accent-color);
    font-weight: 500;
    font-size: 0.9rem;
}

.no-posts {
    text-align: center;
    padding: 40px 15px;
    color: var(--text-secondary);
}

.no-posts p {
    margin-bottom: 15px;
}

/* Remaining styles... (utility classes, responsive styles) */

/* ======= UTILITY CLASSES ======= */
.text-center {
    text-align: center;
}

.mt-10 {
    margin-top: 10px;
}

.mt-20 {
    margin-top: 20px;
}

.mb-10 {
    margin-bottom: 10px;
}

.mb-20 {
    margin-bottom: 20px;
}

.w-100 {
    width: 100%;
}

.flex {
    display: flex;
}

.flex-between {
    justify-content: space-between;
}

.flex-center {
    justify-content: center;
}

.items-center {
    align-items: center;
}

.gap-10 {
    gap: 10px;
}

.gap-20 {
    gap: 20px;
}

.hidden {
    display: none;
}

/* ======= RESPONSIVE STYLES ======= */
@media (max-width: 768px) {
    .form-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .header-container {
        padding: 0 10px;
    }
    
    .dropdown-menu {
        right: -10px;
    }
    
    .nav-item span {
        font-size: 10px;
    }
}

/* Desktop layout constraints */
@media (min-width: 601px) {
    body {
        background-color: #0a0a0a;
    }
    
    .header-container {
        width: 100%;
    }
    
    .app-footer {
        max-width: 600px;
        margin: 0 auto;
        left: 50%;
        transform: translateX(-50%);
        width: 100%;
    }
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    margin-top: 0px;
    padding-left: 0 !important;
    margin-bottom: 10px;
    color: var(--text-primary);
    background-color: var(--bg-primary);
}
