/* Global styles */
body {
    background-color: #f8f9fa;
}

/* Add these styles to fix footer positioning */
html, body {
  min-height: 100vh;
}

body {
  display: flex;
  flex-direction: column;
}

.content-wrapper {
  flex: 1;
}

/* Footer styling */
footer {
  background-color: #c7e7e7; /* Lighter version of header color #E0F2F2 */
  border-top: 1px solid rgba(0,0,0,0.05);
  position: relative;
  min-height: 300px;
  display: flex;
  align-items: center;
}



.footer-brand {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
}

.footer-brand img {
  filter: drop-shadow(0 2px 3px rgba(0,0,0,0.1));
}

.footer-brand span {
  font-size: 1.3rem;
  color: #28a745;
  font-weight: 600;
}

.footer-links {
  margin-top: 2rem;
}

.footer-links li {
  margin-bottom: 16px;
}

.footer-links a {
  color: #212529;
  text-decoration: none;
  transition: all 0.3s ease;
  font-size: 1rem;
}

.footer-links a:hover {
  color: #28a745;
  padding-right: 5px;
}

/* Contact info in footer */
.contact-info li {
  margin-bottom: 16px;
  display: flex;
  align-items: center;
}

.contact-info i {
  width: 20px;
  text-align: center;
  margin-left: 8px;
}

.contact-info a {
  color: #212529;
  text-decoration: none;
  transition: all 0.3s ease;
}

.contact-info a:hover {
  color: #28a745;
}

/* Social icons in footer */
.social-icons {
  display: flex;
  justify-content: flex-end;
}

.social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: rgba(40, 167, 69, 0.1);
  color: #28a745;
  transition: all 0.3s ease;
  margin: 0 3px;
}

.social-icons a:hover {
  background-color: #28a745;
  color: white;
}

/* Responsive adjustments for footer */
@media (max-width: 767px) {
  .social-icons {
    justify-content: center;
    margin-top: 15px;
  }
}

/* Copyright section */
footer .row.align-items-center {
  border-top: 1px solid rgba(0,0,0,0.05);
  padding-top: 20px;
}

footer .copyright p {
  font-size: 0.95rem;
}

/* Ensure all footer text is dark */
footer a, footer h5, footer p, footer .text-light {
  color: #212529 !important;
}

/* Card styles */
.card {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid rgba(0,0,0,0.125);
    font-weight: bold;
}

/* Dashboard stats */
.stats-card {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

/* Comments */
.comment-card {
    border-left: 4px solid #007bff;
    margin-bottom: 15px;
}

.sentiment-badge {
    float: right;
    font-size: 0.8em;
}

/* Forms */
.form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,0.25);
}

/* Buttons */
.btn-primary {
    background-color: #28a745;
    border-color: #28a745;
}

.btn-primary:hover {
    background-color: #218838;
    border-color: #1e7e34;
}

.btn-primary:focus, .btn-primary.focus {
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.5);
}

.btn-primary:active, .btn-primary.active {
    background-color: #1e7e34;
    border-color: #1c7430;
}

/* Success button - already green but ensuring consistency */
.btn-success {
    background-color: #28a745;
    border-color: #28a745;
}

.btn-success:hover {
    background-color: #218838;
    border-color: #1e7e34;
}

/* Secondary buttons with outline */
.btn-outline-primary {
    color: #28a745;
    border-color: #28a745;
}

.btn-outline-primary:hover {
    background-color: #28a745;
    border-color: #28a745;
    color: white;
}

/* For any other button types that might be used */
.btn-info, .btn-warning, .btn-danger {
    border-radius: 4px;
}

/* Navigation */
.navbar {
  box-shadow: none !important;
  margin-bottom: 0 !important;
  background-color: #E0F2F2 !important; /* Light teal color */
  border-bottom: none;
}

.navbar-brand {
    font-weight: bold;
}

.nav-link.active {
    color: #28a745 !important;
    font-weight: bold;
}

.nav-link:hover {
    color: #28a745 !important;
}

/* Custom Modal System */
.rominext-modal {
    --modal-bg: #ffffff;
    --modal-border-radius: 20px;
    --modal-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    --modal-backdrop: rgba(0, 0, 0, 0.6);
    --primary-color: #28a745;
    --primary-hover: #218838;
    --secondary-color: #6c757d;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --success-color: #28a745;
    --info-color: #17a2b8;
    --text-primary: #2d3748;
    --text-secondary: #718096;
    --border-color: #e2e8f0;
}

.rominext-modal .modal-dialog {
    margin: 2rem auto;
    max-width: 500px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.rominext-modal .modal-dialog.modal-lg {
    max-width: 800px;
}

.rominext-modal .modal-dialog.modal-sm {
    max-width: 300px;
}

.rominext-modal .modal-content {
    background: var(--modal-bg);
    border: none;
    border-radius: var(--modal-border-radius);
    box-shadow: var(--modal-shadow);
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.rominext-modal .modal-backdrop {
    background-color: var(--modal-backdrop);
    backdrop-filter: blur(5px);
}

.rominext-modal .modal-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem 2rem;
    position: relative;
}

.rominext-modal .modal-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.rominext-modal .modal-title i {
    font-size: 1.1rem;
    opacity: 0.8;
}

.rominext-modal .btn-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-secondary);
    opacity: 0.6;
    transition: all 0.2s ease;
    padding: 0.5rem;
    border-radius: 50%;
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rominext-modal .btn-close:hover {
    opacity: 1;
    background-color: rgba(0, 0, 0, 0.05);
    transform: scale(1.1);
}

.rominext-modal .modal-body {
    padding: 2rem;
    color: var(--text-primary);
    line-height: 1.6;
}

.rominext-modal .modal-footer {
    background: #f8f9fa;
    border-top: 1px solid var(--border-color);
    padding: 1.5rem 2rem;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

/* Modal Types */
.rominext-modal.modal-success .modal-header {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    border-bottom-color: #b8dacc;
}

.rominext-modal.modal-success .modal-title {
    color: #155724;
}

.rominext-modal.modal-danger .modal-header {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    border-bottom-color: #f1b0b7;
}

.rominext-modal.modal-danger .modal-title {
    color: #721c24;
}

.rominext-modal.modal-warning .modal-header {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border-bottom-color: #ffeaa7;
}

.rominext-modal.modal-warning .modal-title {
    color: #856404;
}

.rominext-modal.modal-info .modal-header {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    border-bottom-color: #b8daff;
}

.rominext-modal.modal-info .modal-title {
    color: #0c5460;
}

/* Custom Buttons */
.rominext-modal .btn {
    border-radius: 12px;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border: none;
    position: relative;
    overflow: hidden;
}

.rominext-modal .btn:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.rominext-modal .btn:hover:before {
    left: 100%;
}

.rominext-modal .btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
}

.rominext-modal .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.3);
}

.rominext-modal .btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: white;
}

.rominext-modal .btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(108, 117, 125, 0.3);
}

.rominext-modal .btn-danger {
    background: linear-gradient(135deg, var(--danger-color) 0%, #c82333 100%);
    color: white;
}

.rominext-modal .btn-danger:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(220, 53, 69, 0.3);
}

/* Animation */
.rominext-modal.fade .modal-dialog {
    transform: translate(0, -50px) scale(0.9);
    opacity: 0;
}

.rominext-modal.show .modal-dialog {
    transform: translate(0, 0) scale(1);
    opacity: 1;
}

/* RTL Support */
html[dir="rtl"] .rominext-modal .modal-footer {
    justify-content: flex-start;
}

html[dir="rtl"] .rominext-modal .btn-close {
    left: 1.5rem;
    right: auto;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .card {
        margin-bottom: 15px;
    }

    .container {
        padding: 10px;
    }

    .rominext-modal .modal-dialog {
        margin: 1rem;
        max-width: calc(100% - 2rem);
    }

    .rominext-modal .modal-header,
    .rominext-modal .modal-body,
    .rominext-modal .modal-footer {
        padding: 1rem 1.5rem;
    }

    .rominext-modal .modal-footer {
        flex-direction: column-reverse;
    }

    .rominext-modal .modal-footer .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

/* Dashboard sidebar styles */
.sidebar {
    padding: 20px 0;
    background-color: #f8f9fa;
    /* Removed min-height to prevent menu collapse issues */
    overflow-y: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* Internet Explorer 10+ */
}

/* Social platform username fields - always left-to-right */
input[name="account_identifier"],
input[name*="platform_handles"],
input[id="account_identifier"],
input[id="instagram"],
input[id="facebook"],
input[id="twitter"],
input[id="linkedin"],
input[id="youtube"],
input[id="tiktok"],
input[id="telegram"] {
    direction: ltr !important;
    text-align: left !important;
}

/* Hide scrollbar for WebKit browsers */
.sidebar::-webkit-scrollbar {
    display: none;
}

/* Fix for RTL sidebar */
html[dir="rtl"] .sidebar {
    border-right: none;
    border-left: 1px solid #dee2e6;
}

html[dir="ltr"] .sidebar {
    border-right: 1px solid #dee2e6;
    border-left: none;
}

.sidebar .nav-link {
    font-weight: 500;
    color: #333;
    padding: .75rem 1rem;
}

html[dir="rtl"] .sidebar .nav-link {
    border-right: 3px solid transparent;
    border-left: none;
    text-align: right;
}

html[dir="ltr"] .sidebar .nav-link {
    border-left: 3px solid transparent;
    border-right: none;
    text-align: left;
}

.sidebar .nav-link:hover {
    background-color: rgba(0, 0, 0, .05);
}

.sidebar .nav-link.active {
    border-color: transparent;
}

/* Responsive adjustments */
@media (max-width: 767.98px) {
    .sidebar {
        position: static;
        padding-top: 1.5rem;
        margin-top: 0;
    }
}

/* Flag icon styling */
.navbar-nav .nav-link img {
    vertical-align: middle;
}

.navbar-nav .nav-link.d-flex.align-items-center {
    display: flex;
    align-items: center;
    height: 100%;
}

/* Ensure consistent styling for all nav items */
.navbar-nav .nav-item {
    display: flex;
    align-items: center;
}

.navbar-nav .nav-link {
    padding: 0.5rem 1rem;
    color: rgba(0, 0, 0, 0.55);
    transition: color 0.15s ease-in-out;
}

.navbar-nav .nav-link:hover {
    color: #28a745;
}

.navbar-nav .nav-link.active {
    color: #28a745;
    font-weight: 500;
}

/* Navbar styling for logo isolation */
.navbar-brand {
    position: relative;
}

.navbar-brand::after {
    content: '';
    position: absolute;
    right: -15px;
    top: 50%;
    transform: translateY(-50%);
    height: 24px;
    width: 1px;
    background-color: rgba(0, 0, 0, 0.1);
}

/* RTL support for the separator */
html[dir="rtl"] .navbar-brand::after {
    right: auto;
    left: -15px;
}

/* Add some spacing to the menu items */
.navbar-nav .nav-item:not(:last-child) {
    margin-right: 5px;
}

html[dir="rtl"] .navbar-nav .nav-item:not(:last-child) {
    margin-right: 0;
    margin-left: 5px;
}

/* Sidebar submenu styles - updated */
.sidebar .collapse {
    padding-right: 0;
}

.sidebar .collapse .nav-link {
    padding: 0.5rem 1.5rem; /* Keep consistent padding with main menu items */
    font-size: 0.9rem;
}

/* Remove any indentation styling */
.sidebar .collapse .nav-item {
    border-right: none;
    border-left: none;
}

/* Main menu items styling */
.sidebar .main-menu-item {
    font-weight: bold;
    padding: 0.8rem 1.5rem;
    border-bottom: 1px solid #eaeaea;
    background-color: #f8f9fa;
    color: #333;
}

/* Remove underline/border from parent menu items when expanded */
.sidebar .main-menu-item[aria-expanded="true"] {
    border-bottom: none !important;
    text-decoration: none !important;
}

.sidebar .main-menu-item:hover {
    background-color: #e9ecef;
}

.sidebar .main-menu-item.active {
    background-color: #e3e6e9;
    color: #000;
}

/* Submenu styling - tree-like structure with RTL/LTR support */
.sidebar .submenu {
    background-color: #ffffff;
    padding-right: 0;
}

/* LTR indentation - indent to the right */
html[dir="ltr"] .sidebar .submenu {
    margin-right: 20px;
    margin-left: 0;
}

/* RTL indentation - indent to the left */
html[dir="rtl"] .sidebar .submenu {
    margin-left: 20px;
    margin-right: 0;
}

.sidebar .submenu-item {
    font-weight: normal;
    font-size: 0.9rem;
    padding: 0.5rem 1rem 0.5rem 0.5rem;
    color: #555;
    margin-bottom: 2px;
    background-color: #f8f9fa;
}

/* LTR submenu item border - removed for cleaner look */
html[dir="ltr"] .sidebar .submenu-item {
    border-right: none;
    border-left: none;
}

/* RTL submenu item border - removed for cleaner look */
html[dir="rtl"] .sidebar .submenu-item {
    border-left: none;
    border-right: none;
}

.sidebar .submenu-item:hover {
    background-color: #e9ecef;
    color: #28a745;
}

/* Removed tree-like connector */

/* Adjust icon positioning for tree structure */
.sidebar .submenu-item i {
    color: #6c757d;
}

/* LTR icon positioning */
html[dir="ltr"] .sidebar .submenu-item i {
    margin-left: 8px;
    margin-right: 0;
}

/* RTL icon positioning */
html[dir="rtl"] .sidebar .submenu-item i {
    margin-right: 8px;
    margin-left: 0;
}

/* Remove the arrow indicator for expandable menus */
.sidebar .nav-link[data-bs-toggle="collapse"]::after {
    content: none;
}

/* Remove RTL-specific arrow rules */
html[dir="rtl"] .sidebar .nav-link[data-bs-toggle="collapse"]::after,
html[dir="ltr"] .sidebar .nav-link[data-bs-toggle="collapse"]::after {
    content: none;
}

/* Fix dropdown menu positioning and scrolling issues */
body {
  overflow-x: hidden;
}

.dropdown-menu-end {
  right: auto;
  left: 0;
}

html[dir="rtl"] .dropdown-menu-end {
  left: auto;
  right: 0;
}

/* Ensure dropdowns appear above other elements */
.dropdown-menu {
  z-index: 1030;
  position: absolute;
}

/* Fix dropdown positioning for RTL */
html[dir="rtl"] .dropdown-menu {
  text-align: right;
  left: auto !important;
  right: 0 !important;
}

/* Fix dropdown toggle arrow position in RTL */
html[dir="rtl"] .dropdown-toggle::after {
  margin-right: 0.255em;
  margin-left: 0;
}

/* Navigation height adjustments */
.navbar-nav .nav-link {
    padding-top: 12px !important;
    padding-bottom: 12px !important;
    font-size: 1.05rem;
}

.navbar-brand {
    font-size: 1.4rem;
    font-weight: bold;
}
