/* /css/style.css */
/* General body styling to ensure gradient covers full height */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    font-family: 'Inter', sans-serif; /* A nice modern sans-serif font */
}

/* Ensure FontAwesome icons are vertically aligned nicely */
.fas, .fab, .far {
    vertical-align: middle;
}

/* Custom scrollbar for a more polished look (WebKit browsers) */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* General card styling (can be extended or overridden) */
.content-card {
    background-color: white;
    padding: 2rem; /* 32px */
    border-radius: 0.75rem; /* 12px */
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    width: 100%;
    max-width: 600px; /* Default max width, can be overridden */
    margin-left: auto;
    margin-right: auto;
}

/* Default icon styling */
.default-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
    border-radius: 50%; /* Make it a circle */
}

.default-icon-sm {
    width: 2rem;  /* 32px */
    height: 2rem; /* 32px */
    font-size: 0.875rem; /* 14px */
}

.default-icon-md {
    width: 3rem;  /* 48px */
    height: 3rem; /* 48px */
    font-size: 1.125rem; /* 18px */
}

.default-icon-lg {
    width: 4rem;  /* 64px */
    height: 4rem; /* 64px */
    font-size: 1.5rem; /* 24px */
}

/* Autocomplete styles */
.autocomplete-container {
    position: relative;
}

.autocomplete-items {
    position: absolute;
    border: 1px solid #d1d5db; /* gray-300 */
    border-top: none;
    z-index: 99;
    top: 100%;
    left: 0;
    right: 0;
    background-color: white;
    max-height: 200px;
    overflow-y: auto;
    border-bottom-left-radius: 0.375rem; /* rounded-md */
    border-bottom-right-radius: 0.375rem; /* rounded-md */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.autocomplete-items div {
    padding: 0.75rem; /* p-3 */
    cursor: pointer;
    display: flex;
    align-items: center;
}

.autocomplete-items div:hover {
    background-color: #f3f4f6; /* gray-100 */
}

.autocomplete-active {
    background-color: #2563eb !important; /* blue-600 */
    color: white;
}

.selected-organization-tag {
    display: inline-flex;
    align-items: center;
    background-color: #dbeafe; /* blue-100 */
    color: #1e40af; /* blue-800 */
    padding: 0.25rem 0.5rem; /* py-1 px-2 */
    border-radius: 0.375rem; /* rounded-md */
    margin-right: 0.5rem; /* mr-2 */
    margin-bottom: 0.5rem; /* mb-2 */
    font-size: 0.875rem; /* text-sm */
}

.selected-organization-tag .remove-tag {
    margin-left: 0.5rem; /* ml-2 */
    cursor: pointer;
    font-weight: bold;
}
.selected-organization-tag .remove-tag:hover {
    color: #dc2626; /* red-600 */
}

/* Input focus styles for better accessibility and aesthetics */
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="url"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
    border-color: #34d399; /* emerald-400 */
    box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.5);
    outline: none;
}

/* Button variants */
.btn {
    padding: 0.625rem 1.25rem; /* py-2.5 px-5 */
    border-radius: 0.375rem; /* rounded-md */
    font-weight: 500; /* medium */
    transition: all 0.2s ease-in-out;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.4);
}

.btn-primary {
    background-color: #10b981; /* emerald-500 */
    color: white;
}
.btn-primary:hover {
    background-color: #059669; /* emerald-600 */
}

.btn-secondary {
    background-color: #64748b; /* slate-500 */
    color: white;
}
.btn-secondary:hover {
    background-color: #475569; /* slate-600 */
}

.btn-danger {
    background-color: #ef4444; /* red-500 */
    color: white;
}
.btn-danger:hover {
    background-color: #dc2626; /* red-600 */
}

.btn-outline-primary {
    background-color: transparent;
    color: #10b981; /* emerald-500 */
    border: 1px solid #10b981; /* emerald-500 */
}
.btn-outline-primary:hover {
    background-color: #10b981; /* emerald-500 */
    color: white;
}

/* Table styling */
.styled-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    font-size: 0.875rem; /* text-sm */
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    border-radius: 0.5rem; /* rounded-lg */
    overflow: hidden; /* Important for rounded corners on tables */
}

.styled-table th,
.styled-table td {
    padding: 0.75rem 1rem; /* py-3 px-4 */
    text-align: left;
    border-bottom: 1px solid #e5e7eb; /* gray-200 */
}

.styled-table thead th {
    background-color: #f9fafb; /* gray-50 */
    color: #374151; /* gray-700 */
    font-weight: 600; /* semibold */
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.styled-table tbody tr:hover {
    background-color: #f3f4f6; /* gray-100 */
}

.styled-table tbody tr:last-child td {
    border-bottom: none;
}

/* Custom file input */
.custom-file-input::-webkit-file-upload-button {
  visibility: hidden;
}
.custom-file-input::before {
  content: 'Select Image';
  display: inline-block;
  background: linear-gradient(top, #f9f9f9, #e3e3e3);
  border: 1px solid #999;
  border-radius: 3px;
  padding: 5px 8px;
  outline: none;
  white-space: nowrap;
  -webkit-user-select: none;
  cursor: pointer;
  text-shadow: 1px 1px #fff;
  font-weight: 700;
  font-size: 10pt;
  margin-right: 10px;
}
.custom-file-input:hover::before {
  border-color: black;
}
.custom-file-input:active::before {
  background: -webkit-linear-gradient(top, #e3e3e3, #f9f9f9);
}

.tooltip {
  position: relative;
  display: inline-block;
}

.tooltip .tooltiptext {
  visibility: hidden;
  width: auto;
  min-width: 120px;
  background-color: #334155; /* slate-700 */
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 5px 10px;
  position: absolute;
  z-index: 10;
  bottom: 125%; /* Position the tooltip above the text */
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.3s;
  white-space: nowrap;
}

.tooltip .tooltiptext::after {
  content: "";
  position: absolute;
  top: 100%; /* At the bottom of the tooltip */
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: #334155 transparent transparent transparent;
}

.tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
}

/* Badge styling */
.badge {
    padding: 0.25em 0.6em;
    font-size: 75%;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.25rem;
}

.badge-owner {
    color: #fff;
    background-color: #dc2626; /* red-600 */
}
.badge-moderator {
    color: #fff;
    background-color: #f59e0b; /* amber-500 */
}
.badge-user {
    color: #fff;
    background-color: #2563eb; /* blue-600 */
}
.badge-member {
    color: #fff;
    background-color: #10b981; /* emerald-500 */
}

/* New Sidebar styles */
#app-sidebar a.sidebar-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #334155; /* slate-700 */
    transition: all 0.2s ease-in-out;
    cursor: pointer;
    background-size: cover;
    background-position: center;
}

#app-sidebar a.sidebar-icon:hover {
    border-radius: 16px;
    background-color: #10b981; /* emerald-500 */
}

#app-sidebar a.sidebar-icon.active {
    border-radius: 16px;
    background-color: #059669; /* emerald-600 */
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.7);
}

/* Top bar icon styles */
.topbar-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #e2e8f0; /* slate-200 */
    color: #475569; /* slate-600 */
    transition: transform 0.2s ease-in-out;
    background-size: cover;
    background-position: center;
    font-weight: bold;
}
.topbar-icon:hover {
    transform: scale(1.1);
}