 @import url("https://fonts.googleapis.com/css2?family=Outfit:wght@100..900&family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");

:root {
  --blue: #2fa3f0;
  --light-blue: #9ccff3;
  --bcg: #e7e9e9;
  --dark-grey: #657786;
  --lighter-grey: #f5f8fa;
  --font-color: #14171a;
  --card-bg: #ffffff;
  --card-border: rgba(0, 0, 0, 0.3);
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
@keyframes bounceHand {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(10px); }
}
.dark-mode {
  --bcg: #14171a;
  --font-color: #f5f8fa;
  --card-bg: #292c2f;
  --card-border: rgba(255, 255, 255, 0.3);
}
.badge {
    background-color: red;
    color: white;
    padding: 3px 7px;
    border-radius: 50%;
    font-size: 12px;
    position: relative;
    top: -10px;
    right: 10px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
  position: relative;
  color: var(--font-color);
  scroll-behavior: smooth;
  transition: all 0.2s ease-in-out;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}


  .scroll-hand {
    font-size: 60px;
    color: white;
    animation: bounce 2s infinite;
    filter: drop-shadow(0 0 6px gold);
    cursor: pointer;
  }

  @keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
      transform: translateY(0);
    }
    40% {
      transform: translateY(15px);
    }
    60% {
      transform: translateY(8px);
    }
  }

.image-slider {
  position: relative;
  width: 100%;
  max-width: 400px;
  overflow: hidden;
  border-radius: 10px;
}
.promoted-tale-enhanced {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.05);
    padding: 20px;
    margin: 32px auto;
    max-width: 640px;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
    border: 1px solid #e5e7eb;
}

.promoted-tale-enhanced:hover {
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.promoted-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 14px;
}

.promoted-title {
    font-size: 18px;
    font-weight: 600;
    color: #111827;
    margin: 0;
}

.promoted-subtitle {
    font-size: 13px;
    color: #6b7280;
    background-color: #f3f4f6;
    padding: 2px 10px;
    border-radius: 9999px;
    display: inline-block;
    margin-top: 4px;
}

.promoted-options {
    font-size: 22px;
    color: #9ca3af;
    cursor: pointer;
}

.promoted-body {
    font-size: 15px;
    color: #1f2937;
    margin-top: 10px;
}

.promoted-text {
    margin-bottom: 12px;
    line-height: 1.6;
}

.promoted-media {
    width: 100%;
    max-height: 380px;
    object-fit: cover;
    border-radius: 12px;
    background-color: #f9fafb;
    transition: transform 0.3s ease;
}

.promoted-media:hover {
    transform: scale(1.01);
}

.promoted-footer {
    border-top: 1px solid #e5e7eb;
    margin-top: 16px;
    padding-top: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.promoted-cta {
    background-color: #2563eb;
    color: #ffffff;
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.promoted-cta:hover {
    background-color: #1d4ed8;
}

.promoted-tag {
    font-size: 13px;
    color: #4b5563;
    font-weight: 500;
}
    .video-container {
        position: relative;
        width: 100%;
        max-width: 500px;
        margin: auto;
        background: black; /* Ensures that there is a background behind the preview */
    }

    .promoted-video {
        width: 100%;
        height: auto;
        display: block;
        background: #000; /* Ensure a dark background behind the video */
    }

    .play-button-container {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        background: rgba(0, 0, 0, 0.6);
        border-radius: 50%;
        padding: 15px;
        cursor: pointer;
    }

    .play-button {
        background: transparent;
        border: none;
        color: white;
        font-size: 24px;
        cursor: pointer;
    }

/* Play/Pause Button */
.play-pause-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    padding: 10px 15px;
    font-size: 20px;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
    cursor: pointer;
}
.tale-username {
    color: var(--font-color);
    font-weight: bold;
}

/* User Status Header */
.status-header {
    position: absolute;
    top: 0;
    left: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.6);
    padding: 8px;
    border-radius: 10px;
    color: var(--font-color);
}

/* Profile Picture */
.profile-pic {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
}

/* Profile Picture Placeholder */
.profile-pic-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    color: white;
    text-transform: uppercase;
    background: linear-gradient(135deg, #8e8e8e, #b5b5b5);
}

/* Follow Button */
.follow-btn {
    padding: 6px 14px;
    font-size: 14px;
    font-weight: bold;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    transition: 0.3s;
    background: #1877f2; /* Facebook blue */
    color: white;
}

.follow-btn:hover {
    background: #145dbf;
}

.follow-btn.following {
    background: #34a853; /* Green for following */
}

.follow-btn.following:hover {
    background: #2c8c44;
}
/* Video & Image Container */
.video-container {
    position: relative;
    display: block;
    width: 100%;
    height: auto;
    margin-top:80px;  /* Adjust margin for spacing */
    overflow: hidden;  /* Prevent content from overflowing */
    border-radius: 15px;  /* Rounded corners */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
    background-color: black;  /* Background black for videos */
    padding: 10px; /* Optional padding around media */
}

/* Status Image Styling */
.status-image {
    width: 100%;
    height: auto;
    max-height: 75vh;  /* Limit height to ensure it doesn't overflow */
    object-fit: cover;  /* Make the image cover the area without stretching */
    border-radius: 15px;  /* Rounded corners for the image */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); /* Shadow for depth */
    transition: all 0.3s ease; /* Smooth transition for hover or interactions */
}

/* Status Video Styling */
.story-video {
    width: 100%;
    height: auto;
    max-height: 75vh;  /* Set max height for video */
    object-fit: cover;  /* Ensure the video covers the container without stretching */
    border-radius: 15px;  /* Rounded corners for the video */
    background-color: black;  /* Keep a black background for the video area */
    transition: all 0.3s ease; /* Smooth transition for hover or interactions */
}

/* Hover effect for status media */
.video-container:hover .status-image,
.video-container:hover .story-video {
    transform: scale(1.05); /* Slight zoom effect */
}

/* Placeholder for loading media */
.video-container .placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    margin-top:80px; 
    justify-content: center;
    align-items: center;
    font-size: 18px;
    color: white;
    background-color: rgba(0, 0, 0, 0.5);
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2); /* Shadow to emphasize */
}


/* Centering layout in status viewer */
#statusViewer {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 16px;
    box-sizing: border-box;
    background-color: rgba(0, 0, 0, 0.7); /* Subtle background */
    border-radius: 15px;
    position: relative; /* Allow absolute positioning of children */
    width: 100%; /* Full width of the container */
    max-width: 800px; /* Limit max width for better readability */
    margin: 0 auto; /* Centering in the viewport */
}

/* Actions (like, comment, share) */
.actions {
    position: absolute;
    bottom: 15%; /* Positioned near the bottom */
    right: 0%;  /* Positioned from the right */
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0px;
    z-index: 2;  /* Ensure actions are above other content */
}

/* Action buttons (like, comment, share) */
.actions span {
     /* Slightly transparent background */
    color: white;
    padding: 12px;
    
    border-radius: 50%;  /* Circular buttons */
    cursor: pointer;
    font-size: 30px;
    text-align: center;
    transition: transform 0.2s, background-color 0.2s;  /* Smooth transition for hover */
}

/* Hover effect for action buttons */
.actions span:hover {
    transform: scale(1.2); /* Slight zoom effect */
    background-color: rgba(0, 0, 0, 0.8); /* Darker background on hover */
}

/* Status Text */
.status-text {
    position: absolute;
    bottom: 15%; /* Positioned above the action buttons */
    left: 5%;
    color: white;
    font-size: 16px;
    line-height: 1.5;
    font-weight: bold;
    padding: 8px;
    border-radius: 5px;
    max-width: 80%;  /* Limit text width for better readability */
    background-color: rgba(0, 0, 0, 0.6); /* Slightly transparent background */
}

/* Text-only status styling */
.text-only {
    display: flex;
    top: 100px;
    justify-content: center;
    align-items: center;
    height: 70%;
    text-align: center;
    font-size: 16px;
    color: white;
    background-color: blue; /* Dark background for text */
    border-radius: 15px;
    padding: 10px;
    width: 100%;
    max-width: 90%;  /* Limit width for text content */
    box-sizing: border-box;
}


/* Status Container */
.status-container {
    display: flex;
    overflow-x: auto;
    white-space: nowrap;
    padding: 10px;
    background: white;
    border-bottom: 1px solid #ddd;
    scrollbar-width: none;
}

.status-container::-webkit-scrollbar {
    display: none;
}

/* Status Group */
.status-group {
    flex: 0 0 auto;
    width: 85px;
    height: 100px;
    margin: 5px;
    border: 3px solid #4caf50;
    border-radius: 15%;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    position: relative;
}

.status-group img,
.status-group video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Modal for Viewing Status */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: black;
    overflow-y: auto;
    scroll-snap-type: y mandatory;
}

/* Status Item */
.status-item {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    scroll-snap-align: start;
    position: relative;
    overflow: hidden;
}

.status-item img,
.status-item video {
    width: 100%;
    height: 80%;
    object-fit: cover;
}

/* Status Username */
.status-username {
    font-size: 12px;
    font-weight: bold;
    color: #333;
    text-align: center;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}


/* Status Preview */
.status-preview {
    width: 85px;
    height: 100px;
    border-radius: 8%;
    overflow: hidden;
    background-color: #f1f1f1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.status-preview img,
.status-preview video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Like Count */
.like-count {
    font-size: 14px;
}

    /* Modal container */
    .comment-modal {
        position: fixed;
        top: 80%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 100%;
        max-height: 80vh;
        background-color: white;
        border-radius: 12px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
        padding: 20px;
        overflow-y: auto;
        z-index: 1000;
        font-family: 'Segoe UI', sans-serif;
    }

    /* Modal header */
    .comment-modal h3 {
        margin-top: 0;
        margin-bottom: 10px;
        font-size: 20px;
        color: #1c1e21;
        border-bottom: 1px solid #ddd;
        padding-bottom: 10px;
    }

    /* Close button */
    .close-comment-btn {
        position: absolute;
        top: 12px;
        right: 16px;
        font-size: 20px;
        color: #555;
        cursor: pointer;
        transition: 0.2s ease;
    }

    .close-comment-btn:hover {
        color: #000;
        transform: scale(1.1);
    }
 .comments {
        margin-top: 10px;
        height: 150px; /* Fixed height */
        overflow-y: auto;
        padding-right: 5px;
    }

   

    /* Comment input section */
    .comment-input {
        display: flex;
        align-items: center;
        margin-top: 15px;
        gap: 10px;
    }

    .comment-input input[type="text"] {
        flex: 1;
        padding: 10px 14px;
        border-radius: 20px;
        border: 1px solid #ccc;
        font-size: 14px;
        background: #f0f2f5;
        outline: none;
        transition: border-color 0.2s;
    }

    .comment-input input[type="text"]:focus {
        border-color: #1877f2;
        background-color: #fff;
    }

    .comment-input button {
        padding: 8px 16px;
        border-radius: 20px;
        background-color: #1877f2;
        color: white;
        font-weight: bold;
        border: none;
        cursor: pointer;
        transition: 0.2s ease;
    }

    .comment-input button:hover {
        background-color: #166fe5;
    }

    /* Scrollbar customization for modern browsers */
    .comments::-webkit-scrollbar {
        width: 6px;
    }

    .comments::-webkit-scrollbar-thumb {
        background-color: #ccc;
        border-radius: 10px;
    }

    .comments::-webkit-scrollbar-track {
        background-color: transparent;
    }



/* Video Controls */
.controls {
    position: absolute;
    bottom: 15%;
    left: 10px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.controls button {
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
}

/* Progress Bar */
.progress-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 80%;
    height: 12px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 6px;
    position: absolute;
    bottom: 3%;
    left: 50%;
    transform: translateX(-50%);
    cursor: pointer;
    overflow: hidden;
    padding: 5px 10px;
}

/* Progress Indicator */
.progress {
    position: absolute;
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #00c6ff, #0072ff);
    border-radius: 6px;
    transition: width 0.3s ease-in-out;
}

/* Close Button */
.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 24px;
    color: white;
    cursor: pointer;
}

.containerz {
    display: flex;
    align-items: center;  /* vertical align center */
    justify-content: flex-start;
    padding: 10px 20px;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    margin: auto;
    height: 60px;
    gap: 20px;  /* spacing between children */
}

/* Create Post Button */
.create-post-btn {
    background: #1877f2;
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    font-size: 24px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s ease-in-out;
    display: flex;
    align-items: center;
    justify-content: center;
}

.create-post-btn:hover {
    background: #145dbf;
}

/* TradeTales Logo */
.logo {
    font-size: 24px;

    margin-right: 30px;

    font-weight: bold;
    white-space: nowrap;
    margin: 0;
}


/.logo .trade {
    font-size: 18px;
    font-weight: bold;
    color: var(--font-color);  /* Use dynamic color */
    
    position: relative;
    top: -10px;
}
/* "Tales" to the Right of the Button */
.logo-container {
    display: flex;
    align-items: center;
}
/* Modal Background */
.modal {
    display: none; /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
     /* Dark overlay */
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity 0.3s ease-in-out;
}

/* Modal Content */
.modal-content {
    background: white;
    padding: 20px;
    border-radius: 12px;
    width: 90%;
    max-width: 380px;
    text-align: center;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.2);
    animation: fadeIn 0.3s ease-in-out;
    position: relative;
}

/* Modal Heading */
.modal-content h3 {
    font-size: 20px;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
}

/* Textarea */
#postText {
    width: 100%;
    height: 100px;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 14px;
    resize: none;
    outline: none;
    transition: border 0.3s;
}



#postText:focus {
    border-color: #007bff;
}

/* File Upload (Hidden Input) */
#postMedia {
    display: none;
}

/* Custom File Upload Button */
.upload-label {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f1f1;
    color: #555;
    padding: 10px;
    border-radius: 8px;
    margin: 10px 0;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.upload-label:hover {
    background: #e0e0e0;
}
.emoji-tray {
    display: none;
    position: absolute;
    bottom: 60px;
    left: 10px;
    background-color: #fff;
    border: 1px solid #ccc;
    padding: 10px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 100;
    max-width: 1000px;
    overflow: auto;
    white-space: nowrap;
}

    @keyframes fadeIn {
        from { opacity: 0; transform: translateY(10px); }
        to { opacity: 1; transform: translateY(0); }
    }

    .fade-in {
        animation: fadeIn 0.4s ease-in-out;
    }

    .comment.reply {
        margin-left: 40px;
    }

    .comment-card:hover {
        background: #e4e6eb;
    }

    .reply-box input {
        outline: none;
    }

    .reply-box button:hover {
        background-color: #0556d1;
    }


.emoji-tray .emoji {
    font-size: 20px;
    margin: 5px;
    cursor: pointer;
    padding: 5px;
}

.emoji-tray .emoji:hover {
    background-color: #f0f0f0;
}
.emoji-picker {
    width: 300px;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 10px;
    overflow: hidden;
    font-family: sans-serif;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.emoji-search {
    width: 100%;
    padding: 10px;
    border: none;
    border-bottom: 1px solid #ddd;
    font-size: 16px;
    outline: none;
}

.emoji-tabs {
    display: flex;
    justify-content: space-around;
    background: #f5f5f5;
    border-bottom: 1px solid #ddd;
}

.emoji-tabs button {
    flex: 1;
    padding: 10px 0;
    font-size: 18px;
    background: none;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease;
}

.emoji-tabs button:hover {
    background: #eaeaea;
}

.emoji-container {
    max-height: 200px;
    overflow-y: auto;
    padding: 10px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.emoji {
    font-size: 24px;
    cursor: pointer;
    transition: transform 0.2s;
}

.emoji:hover {
    transform: scale(1.2);
}
.emoji-scroll {
    max-height: 150px;
    overflow-y: auto;
    padding: 5px;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}
.emoji-categories button {
    margin: 2px;
    font-size: 18px;
    cursor: pointer;
}
.emoji {
    font-size: 22px;
    cursor: pointer;
}

/* Post Button */
.modal-content button {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    background: #1877f2;
    color: white;
    transition: 0.3s ease-in-out;
}
/* Button Colors */
.modal-content button:nth-child(2) { background: #007bff; color: white; }  /* Text Only */
.modal-content button:nth-child(3) { background: #28a745; color: white; }  /* Image + Text */
.modal-content button:nth-child(4) { background: #dc3545; color: white; }  /* Video + Text */

.modal-content button:hover {
    opacity: 0.8;
}


.modal-content button:hover {
    background: #145dbf;
}

/* Error Message */
.error {
    color: red;
    font-size: 14px;
    margin-top: 8px;
    display: none;
}

/* Close Button */
.close {
    position: absolute;
    top: 12px;
    right: 15px;
    font-size: 24px;
    color: #333;
    cursor: pointer;
    transition: 0.3s;
}
.progress-wrapper {
    display: flex;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    gap: 2px;
    padding: 5px;
    z-index: 10;
}

.progress-segment {
    flex: 1;
    height: 3px;
    background-color: rgba(255, 255, 255, 0.3);
    position: relative;
    overflow: hidden;
}
.progress-segment::after {
    content: '';
    display: block;
    height: 100%;
    width: 0%;
    background-color: white;
    transition: width 3s linear;
}
.progress-segment.filled::after {
    width: 100%;
}

/* Floating emoji */
.floating-emoji {
    position: absolute;
    font-size: 24px;
    animation: floatUp 2s ease-out forwards;
    pointer-events: none;
    color: red;
}
@keyframes floatUp {
    0% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(-100px); opacity: 0; }
}

.close:hover {
    color: #ff0000;
}

/* Fade-in animation */
@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

/* Time Display */
.time-display {
    font-size: 14px;
    color: white;
    min-width: 60px;
}
.logo .tales {
    font-size: 18px;
    font-weight: bold;
    left: -40px;
    color: #1877f2; /* Blue */
    margin-left: -30px; /* Space from the button */
    font-style: italic;
}
/* Container for the reply bar */

.reply-bar {
    display: none;
    align-items: center;
    gap: 10px;
    width: 80%;
    max-width: 600px;
    background: #fff;
    border-radius: 20px;
    padding: 8px 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    position: absolute;
    bottom: 60px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.reply-bar input {
    flex: 1;
    border: none;
    width: 80%
    outline: none;
    font-size: 15px;
    padding: 6px 10px;
    border-radius: 20px;
    background: #f0f2f5;
}

.reply-bar button {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: #1877f2; /* Facebook Blue */
}


.floating-emoji {
    animation: floatUp 2s ease-out forwards;
    opacity: 1;
    z-index: 99;
}

@keyframes floatUp {
    0% {
        transform: translateY(0);
        opacity: 1;
    }
    100% {
        transform: translateY(-80px);
        opacity: 0;
    }
}

/* Button for emoji tray */
.reply-bar button {
    background-color: transparent; /* Transparent background */
    border: none; /* Remove the default button border */
    color: #333; /* Dark text for the emoji button */
    font-size: 24px; /* Emoji size */
    cursor: pointer; /* Show pointer cursor on hover */
    margin-right: 10px; /* Space between emoji button and text input */
}

/* Add border color on focus */
.reply-bar input[type="text"]:focus {
    border-color: #007bff; /* Blue border on focus */
}

/* Send button */
.reply-bar button:last-child {
    background-color: #007bff; /* Blue background */
    color: #fff; /* White text */
    padding: 8px 16px; /* Padding inside the send button */
    border-radius: 25px; /* Round the corners */
    cursor: pointer; /* Pointer cursor on hover */
    font-size: 16px; /* Text size */
    border: none; /* Remove the default border */
}
.liked {
    color: blue;
    font-weight: bold;
}

/* Send button hover effect */
.reply-bar button:last-child:hover {
    background-color: #0056b3; /* Darker blue when hovered */
}

/* Optional: Add some spacing between the buttons and input field */
.reply-bar button:hover {
    background-color: #f0f0f0; /* Change background color on hover for emoji button */
}
.image-container {
  display: flex;
  transition: transform 0.5s ease-in-out;
}

.slider-image {
  width: 100%;
  display: block;
  border-radius: 10px;
}

.prev-btn, .next-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  cursor: pointer;
  padding: 10px;
  font-size: 18px;
  border-radius: 50%;
}

.prev-btn { left: 10px; }
.next-btn { right: 10px; }

.prev-btn:hover, .next-btn:hover {
  background: rgba(0, 0, 0, 0.8);
}
.image-grid {
  display: grid;
  gap: 10px;
  justify-content: center;
}

.image-grid img {
  width: 100%;
  border-radius: 10px;
}

.image-grid[data-count="2"] {
  grid-template-columns: repeat(2, 1fr);
}

.image-grid[data-count="3"] {
  grid-template-columns: 1fr 1fr;
}

.image-grid[data-count="3"] img:first-child {
  grid-column: span 2;
}

.image-grid[data-count="4"] {
  grid-template-columns: repeat(2, 1fr);
}
/* Buttons */
.product-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
}

.buy-button,
.details-button,
.share-button {
    background: #0056b3;
    color: white;
    padding: 8px 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.buy-button:hover,
.details-button:hover,
.share-button:hover {
    background: #003f7f;
}
.notification-popup {
    display: none;
    position: fixed;
    top: 60px; /* Appears near the top */
    right: 20px;
    width: 320px;
    background: var(--popup-bg); /* Frosted glass effect */
    backdrop-filter: blur(10px); /* Softens background for a glassy effect */
    padding: 20px;
    border-radius: 12px;
    border: 1px solid var(--popup-border);
    box-shadow: 0px 8px 20px var(--popup-shadow);
    text-align: center;
    font-family: "Poppins", sans-serif;
    font-size: 14px;
    z-index: 9999;
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
    color: var(--popup-text);
}

/* Show animation */
.notification-popup.show {
    opacity: 1;
    transform: translateY(0);
}

/* Buttons */
.popup-buttons {
    display: flex;
    justify-content: space-between;
    gap: 8px;
    margin-top: 12px;
}

.popup-buttons button {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: 0.3s ease-in-out;
    text-transform: uppercase;
}
 img {
          
            -webkit-touch-callout: none; /* Prevents long-press menu in iOS */
            -webkit-user-select: none; /* Prevents selection */
            -moz-user-select: none;
            -ms-user-select: none;
            user-select: none;
            pointer-events: auto; /* Allows interaction but prevents menu */
        }

/* Allow Button - Modern Gradient */
.popup-buttons button:last-child {
    background: linear-gradient(135deg, #28a745, #218838);
    color: white;
}

.popup-buttons button:last-child:hover {
    background: linear-gradient(135deg, #218838, #1a6d2f);
}

/* Deny Button - Softer Gray */
.popup-buttons .deny {
    background: linear-gradient(135deg, #28a745, #218838);
    color: white;
}

.popup-buttons .deny:hover {
    background: var(--deny-hover);
}

/* Close button - Sleek UI */
.close-btn {
    position: absolute;
    top: 10px;
    right: 12px;
    font-size: 18px;
    font-weight: bold;
    color: var(--popup-text);
    cursor: pointer;
    transition: color 0.2s ease-in-out;
}

.close-btn:hover {
    color: red;
}


body {
  background: var(--bcg);
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
}

#overlay {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 2;
  cursor: pointer;
  display: none;
}

.title {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-weight: 600;
  line-height: 95%;
  font-size: 30px;
  margin: 10px auto;
  padding: 10px;
}
.title .subtitle {
  font-weight: 400;
  font-size: 16px;
  color: var(--blue);
  font-style: italic;
  text-align: center;
}
.title .description {
  font-weight: 500;
  font-size: 20px;
  text-align: center;
  color: var(--dark-grey);
}
 
.header {
  height: 80px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bcg);
  box-shadow: 0px 0 1px rgba(0, 0, 0, 0.4);
  border-bottom: 0.1px solid var(--card-border);
  position: sticky;
  top: 0;
  z-index: 3;
}

#open-menu,
#close-menu {
  display: none;
  font-size: 40px;
}

.header .logo {
  margin: 0 20px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
  font-weight: 600;
  font-size: 20px;
  color: var(--font-color);
  cursor: pointer;
}

.header .nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  height: 100%;
}

.header .nav .nav-search-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  height: 50px;
  width: 350px;
  margin-right: 20px;
  padding: 10px 20px;
  border: 0.1px solid var(--card-border);
  border-radius: 50px;
}

.header .nav .nav-search-bar input {
  height: 100%;
  width: 90%;
  border: none;
  outline: none;
  background: transparent;
  color: var(--font-color);
  caret-color: var(--font-color);
  font-weight: 400;
  font-size: 16px;
}

.header .nav .nav-search-bar button {
  height: 100%;
  width: 10%;
  border: none;
  outline: none;
  background: transparent;
  font-weight: 400;
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
::placeholder,
::-webkit-input-placeholder,
::-moz-placeholder {
  color: var(--dark-grey);
}

.header .nav .nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
  height: 100%;
  margin-right: 20px;
  padding: 10px;
  cursor: pointer;
  list-style: none;
}

.header .nav .nav-links .nav-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 100%;
  padding: 10px;
  cursor: pointer;
  font-weight: 500;
  border-bottom: 2px solid transparent;
  transition: all 0.2s ease-in-out;
}

.header .nav .nav-links .nav-link:hover {
  border-bottom: 2px solid var(--blue);
}
.header .nav .nav-links .nav-link .dropdown-arrow {
  transition: transform 0.2s ease-in-out;
}
.header .nav .nav-links .nav-link:hover .dropdown-arrow {
  transform: rotate(-180deg);
}

.header .nav .nav-links .nav-link .dropdown-nav {
  position: absolute;
  top: 110%;
  left: -20%;
  width: 200px;
  background-color: var(--bcg);
  box-shadow: 0px 8px 16px 0px var(--card-border);
  z-index: 2;
  border-radius: 5px;
  margin-top: 10px;
  cursor: pointer;
  transform: scale(0);
  transition: all 0.2s ease-in-out;
  transform-origin: top;
}

.header .nav .nav-links .nav-link:hover .dropdown-nav {
  transform: scale(1);
}

.header .nav .nav-links .nav-link .dropdown-nav li {
  list-style: none;
  padding: 10px 15px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 5px;
  transition: border 0.2s ease-in-out;
  border-bottom: 2px solid transparent;
}

.header .nav .nav-links .nav-link .dropdown-nav li:hover {
  border-color: var(--light-blue);
}

.header .nav-profile {
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: 10px;
  height: 100%;
  margin-right: 20px;
}

.header .nav-profile span {
  cursor: pointer;
  padding: 10px;
  border-radius: 50%;
  transition: background-color 0.2s ease-in-out;
}

.header .nav-profile span:hover {
  background-color: var(--light-blue);
}

.header .nav-profile .nav-acount-profile {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--card-border);
  height: 50px;
  width: 50px;
  border-radius: 50%;
  overflow: hidden;
  cursor: pointer;
}

.header .nav-profile .nav-acount-profile img {
  height: 100%;
  width: 100%;
  object-fit: cover;
}

main {
  width: 100%;
  height: auto;
  display: flex;
  flex-direction: column;
  padding: 20px 10px;
}

main .categories {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: flex-start;
    overflow-x: auto;
    flex-wrap: wrap;
    padding: 10px;
    border-bottom: 2px solid #ddd;
    background: white;
}

/* Filter Section */
.categories .filter-categories {
    display: flex;
    align-items: center;
    gap: 10px;
    border-right: 1px solid #ccc;
    padding-right: 10px;
    margin-right: 10px;
    cursor: pointer;
    font-weight: bold;
    color: #333;
}

/* Categories Section */
.categories .filtered-categories{
    display: flex;
    flex-wrap: nowrap;
    gap: 10px;
    max-width: 100%;
    overflow-x: auto;
    padding: 5px 0;
    max-height: 80px; /* Limits to max 2 rows */
}

/* Individual Category */
.categories .category {
    font-size: 13px;
    padding: 8px 15px;
    background: #007bff;
    color: white;
    border-radius: 20px;
    cursor: pointer;
    transition: background 0.2s ease-in-out;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Hover Effects */
.categories .category:hover {
    background: #0056b3;
}

/* Scrollbar Customization */
.categories::-webkit-scrollbar {
    height: 8px;
}

.categories::-webkit-scrollbar-thumb {
    background: #007bff;
    border-radius: 10px;
}



section {
  display: flex;
  flex-wrap: wrap;
  /* align-items: flex-start; */
  justify-content: space-between;
  margin-top: 20px;
  gap: 5px;
}

section .market-product {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 230px;
  background: var(--card-bg);
  border-radius: 3px;
  margin: 5px auto;
  cursor: pointer;
}

section .market-product:hover h1.product-name {
  text-decoration: underline;
}

@keyframes ping-once {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.5); opacity: 0.8; }
  100% { transform: scale(1); opacity: 1; }
}
.animate-ping-once {
  animation: ping-once 1s ease-in-out 3;
}


.market-product img {
  width: 100%;
  height: 250px;
  object-fit: contain;
  object-position: center;
  border-top-left-radius: 3px;
  border-top-right-radius: 3px;
  border-bottom: 1px solid var(--dark-grey);
}

.market-product h1,
.market-product .product-supplier {
  display: flex;
  justify-content: space-between;
  font-size: 16px;
  font-weight: normal;
  padding: 0 5px;
  line-height: 80%;
}

.market-product h1.product-name {
  font-weight: 600;
}

.market-product h1 span {
  font-size: 14px;
}

.market-product .product-price {
  font-size: 23px;
  font-weight: 600;
  padding: 5px;
  margin-top: -5px;
}

@media (max-width: 1300px) {
  .header .nav .nav-search-bar {
    width: 300px;
  }

  .header .nav .nav-search-bar input {
    width: 90%;
  }

  .header .nav .nav-search-bar button {
    width: 10%;
  }
}

@media (max-width: 1000px) {
  #open-menu {
    display: block;
  }

  .header .nav {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100dvw;
    background-color: var(--bcg);
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    z-index: 2;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;
    height: auto;
    padding: 10px 15px;
    transform: translateX(-100%);
    transition: transform 0.3s ease-in-out;
  }

  .header .nav .nav-search-bar {
    width: 100%;
  }

  .header .nav .nav-links {
    flex-direction: column;
    gap: 10px;
  }

  .header .nav .nav-links .nav-link {
    width: 100%;
    justify-content: flex-start;
    padding: 10px 0;
    align-items: center;
    justify-content: flex-start;
  }

  .header .nav .nav-links .nav-link:not(:first-child) {
    flex-direction: column;
    align-items: flex-start;
  }

  .header .nav .nav-links .nav-link,
  .dropdown-nav li {
    border-bottom: none !important;
  }
  .header .nav .nav-links .nav-link:hover,
  .dropdown-nav li:hover {
    border-bottom: none !important;
  }

  .header .nav .nav-links .nav-link span.dropdown-arrow,
  .hidden-on-mobile {
    display: none;
  }

  .header .nav .nav-links .nav-link .dropdown-nav {
    position: relative;
    background-color: transparent;
    box-shadow: none;
    z-index: 2;
    transform: scale(1);
    left: 20px;
    top: unset;
    width: 100dvw;
  }
  .header .nav .nav-links .nav-link .dropdown-nav li {
    padding: 10px 5px;
  }
}

@media (max-width: 600px) {
 .market-product {
    width: 100vw !important; /* Full viewport width */
    max-width: 100% !important; /* Prevents shrinking */
    margin: 0;
    padding: 0;
    flex: 1 1 auto;
    min-width: 100%;
}
.category-list {
                grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
            }
section {
    width: 100vw;
    max-width: 100% !important;
    display: flex;
    flex-direction: column; /* Ensures stacking */
    align-items: stretch; /* Forces children to expand */
}

  .image-grid {
        grid-template-columns: 1fr !important;
        text-align: center;
    }
.image-container {
  display: flex;
  width: 100%;
  transition: transform 0.5s ease-in-out;
}

.image-container img {
  width: 100vw; /* Full viewport width */
  flex: 0 0 100vw; /* Prevents shrinking & ensures one image per slide */
  object-fit: cover; /* Ensures image fills the container */
}


  .market-product img {
    height: 300px;
  }
 .notification-popup {
        width: 90%;
        right: 5%;
        left: 5%;
    }

.image-grid img {
        max-width: 100%;
        height: auto;
    }
}

@media (max-width: 768px) {
    .categories {
        flex-wrap: nowrap; /* Keep everything in one row */
        overflow-x: auto; /* Enable horizontal scroll */
        overflow-y: hidden; /* Disable vertical scrolling */
        padding: 10px 0;
    }
    .categories .filtered-categories {
        flex-wrap: nowrap; /* Prevent wrapping */
    }
}
