/* Reset and base styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Verdana, sans-serif;
    background-color: #e9eaed;
    color: #141823;
    font-size: 12px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

/* Top Navigation Bar */
.top-nav {
    background-color: #3b5998;
    width: 100%;
    position: relative;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    height: 60px;
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo {
    height: 45px;
    width: auto;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-menu li {
    margin-left: 20px;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    font-size: 14px;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.nav-menu a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Content Area Below Top Nav */
.content-area {
    padding: 20px 0;
    background-color: #f0f2f5;
}

.welcome-section {
    text-align: left;
    padding: 20px;
}

.welcome-section h1 {
    color: #3b5998;
    margin-bottom: 10px;
    text-align: center;
}

.welcome-section p {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.6;
}

/* Add styles for lists in welcome section */
.welcome-section ul {
    color: #666;
    margin-top: 10px;
    margin-bottom: 25px;
    padding-left: 30px;
    line-height: 1.6;
}

.welcome-section li {
    color: #666;
    margin-bottom: 10px;
}

/* Emoji Picker Container */
.emoji-picker-container {
    padding: 20px 0;
    display: flex;
    justify-content: center;
    width: 100%;
}

.emoji-picker-box {
    width: 90%;
    max-width: 1200px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 930px; /* Adjusted height */
}

.picker-header {
    padding: 15px 20px;
    background-color: #f5f6f7;
    border-bottom: 1px solid #dddfe2;
}

#searchInput {
    width: 100%;
    padding: 15px;
    border: 1px solid #d3d6db;
    border-radius: 4px;
    font-size: 14px;
    height: 40px;
    box-sizing: border-box;
}

/* Search Container and Clear Button */
.search-container {
    position: relative;
    width: 95%;
    display: flex;
    align-items: center;
}

.clear-search-btn {
    margin-left: 10px;
    background-color: #3b5998;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    font-weight: bold;
    white-space: nowrap;
    transition: background-color 0.2s;
}

.clear-search-btn:hover {
    background-color: #4a69bb;
}

.clear-search-btn:focus {
    outline: none;
}

.picker-content {
    display: flex;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    width: 200px;
    background-color: #fff;
    border-right: 1px solid #d3d6db;
    padding: 10px;
    overflow-y: auto;
}

.category-btn {
    width: 100%;
    padding: 10px;
    margin-bottom: 5px;
    background-color: #f7f7f7;
    border: 1px solid #d3d6db;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    display: flex;
    align-items: center;
    transition: background-color 0.2s;
}

.category-btn:hover {
    background-color: #e6e9f0;
}

.category-btn.active {
    background-color: #3b5998;
    color: #fff;
}

.category-icon {
    margin-right: 10px;
    font-size: 20px;
}

/* Main Content Area (Emoji Grid) */
.content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.scrollable-area {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.category-title {
    font-size: 16px;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 10px;
    padding: 5px 10px;
    background-color: #f0f0f0;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.category-title.sticky {
    position: sticky;
    top: 0;
    z-index: 10;
}

.skin-tone-selector {
    display: flex;
    gap: 5px;
}

.skin-tone-btn {
    width: 30px;
    height: 30px;
    border: 1px solid #d3d6db;
    border-radius: 3px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fff;
}

.skin-tone-btn:hover {
    background-color: #e6e9f0;
}

.skin-tone-btn.active {
    border: 2px solid #3b5998;
}

.emoji-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-top: 10px;
    flex: 1;
}

.emoticon-item {
    background-color: #fff;
    border: 1px solid #d3d6db;
    border-radius: 5px;
    padding: 10px;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.2s;
    position: relative;
}

.emoticon-item:hover {
    background-color: #f9f9f9;
}

.emoticon-item.selected::after {
    content: "X";
    color: red;
    font-weight: bold;
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 16px;
}

.emoticon-emoji {
    font-size: 30px;
    display: block;
    margin-bottom: 5px;
    font-family: "Twemoji Country Flags", "Segoe UI Emoji", "Segoe UI Symbol", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
}

.emoticon-code {
    font-size: 10px;
    word-break: break-all;
}

.no-results {
    grid-column: 1 / -1;
    text-align: center;
    color: #666;
}

.category-section {
    margin-bottom: 20px;
}

.selected-label {
    font-size: 12px;
    color: #666;
    text-align: left;
    white-space: nowrap;
    margin-right: 100px;
    padding-right: 40px;
}

.selected-emoticon {
    background-color: #e6f0fa;
    border: 1px solid #3b5998;
    border-radius: 5px;
    padding: 8px 12px;
    display: inline-flex;
    align-items: center;
    font-size: 24px;
    font-family: "Twemoji Country Flags", "Segoe UI Emoji", "Segoe UI Symbol", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
}

.clear-btn {
    background-color: #3b5998;
    color: #fff;
    border: none;
    padding: 8px 15px;
    border-radius: 3px;
    cursor: pointer;
    margin-left: auto;
    font-size: 14px;
    font-weight: bold;
}

.clear-btn:hover {
    background-color: #4a69bb;
}

/* Footer */
.footer {
    background-color: #3b5998;
    color: white;
    text-align: center;
    padding: 15px 0;
    margin-top: auto;
}

/* Font Face */
@font-face {
  font-family: 'Twemoji Country Flags';
  src: url('https://cdn.jsdelivr.net/npm/country-flag-emoji-polyfill@0.1.8/dist/TwemojiCountryFlags.woff2') format('woff2');
  unicode-range: U+1F1E6-1F1FF;
}

.flag-emoji {
  font-family: 'Twemoji Country Flags', Verdana, sans-serif !important;
}

/* Page Content Styles */
.page-content {
    padding: 30px;
    line-height: 1.6;
}

.page-content h2 {
    color: #3b5998;
    margin-bottom: 15px;
    font-size: 22px;
}

.page-content h3 {
    color: #555;
    margin-bottom: 10px;
    margin-top: 20px;
    font-size: 18px;
}

.page-content p {
    margin-bottom: 15px;
}

.page-content ul {
    margin-bottom: 20px;
    padding-left: 20px;
}

.page-content li {
    margin-bottom: 8px;
}

/* New Bottom Bar (Moved to Page Bottom - Fixed Position) */
.bottom-bar-fixed {
    position: fixed;
    bottom: 30px;
    left: 0;
    width: 100%;
    background-color: #fff;
    border-top: 1px solid #d3d6db;
    border-bottom: 1px solid #d3d6db;
    padding: 15px 20px;
    /* Remove min-height and set a fixed height instead */
	height: 95px; /* Fixed height - adjust this value as needed */
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    z-index: 1001;
    box-shadow: 0 -2px 4px rgba(0,0,0,0.1);
    box-sizing: border-box;
}

.bottom-bar-content {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    width: 100%;
}

#selectedArea {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    align-items: center;
}

.selected-emoticon {
    background-color: #e6f0fa;
    border: 1px solid #3b5998;
    border-radius: 5px;
    padding: 10px 15px;
    display: inline-flex;
    align-items: center;
    font-size: 28px;
    font-family: "Twemoji Country Flags", "Segoe UI Emoji", "Segoe UI Symbol", "Apple Color Emoji", "Noto Color Emoji", sans-serif;
    margin-right: 5px;
}

.clear-btn {
    background-color: #3b5998;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 3px;
    cursor: pointer;
    margin-left: auto;
    font-size: 14px;
    font-weight: bold;
    white-space: nowrap;
    flex-shrink: 0;
}

.clear-btn:hover {
    background-color: #4a69bb;
}

/* The footer, fixed at the very bottom */
.footer-fixed {
    position: fixed;        /* Fix it to the viewport */
    bottom: 0;              /* Stick to the absolute bottom */
    left: 0;
    width: 100%;
    background-color: #3b5998;
    color: white;
    text-align: center;
    padding: 8px 0;         /* Adjust padding as needed */
    z-index: 1002;          /* Even higher z-index to stay on top of the bar above */
    box-sizing: border-box; /* Include padding in height */
}

.footer-fixed p {
    margin: 0;
    font-size: 11px; /* Adjust font size if needed */
}

/* Add this rule to style links in the fixed footer */
.footer-fixed a {
    color: white; /* Match the footer text color */
    text-decoration: none;
}

.footer-fixed a:hover {
    text-decoration: underline; /* Add underline on hover for better UX */
}

/* Adjust Main Layout to Accommodate Fixed Bars */
body {
    padding-bottom: 120px;
}