

@font-face {
  font-family: "Ubuntu";
  src: url("../../fonts/RobotoSerif-VariableFont_GRAD,opsz,wdth,wght.ttf");
}

@font-face {
  font-family: "MedievalSharp";
  src: url("../../fonts/RobotoSerif-VariableFont_GRAD,opsz,wdth,wght.ttf");
}

html {
  --bs-body-font-family: "Ubuntu", sans-serif !important;
  --bs-font-sans-serif: "Ubuntu", sans-serif !important;
  font-family: "Ubuntu", sans-serif !important;
  font-size: 14px;
  font-weight: 600;
  height: 100%;
}

body {
  height: 100%;
}

.game_container {
  background-color: #212529;
  /* Dark base color */
  background-image:
    radial-gradient(circle at 15% 50%, rgba(255, 255, 255, 0.03) 5%, transparent 20%),
    radial-gradient(circle at 80% 20%, rgba(255, 255, 255, 0.02) 8%, transparent 25%),
    radial-gradient(circle at 35% 85%, rgba(255, 255, 255, 0.04) 6%, transparent 20%),
    radial-gradient(circle at 70% 80%, rgba(255, 255, 255, 0.03) 10%, transparent 30%);
  background-size: 200px 200px;
  /* Increase size to make the pattern less repetitive */
  background-attachment: fixed;
  color: #f8f9fa;
  /* Light text for readability */
  max-height: 100vh;
  max-width: 100vw;
}

#base_container {
  background-color: transparent;
}

/* Theme adjustments for dark background */
.card {
  color: #f0e6d2;
  /* Default light text color for all cards */
  /* background-color: rgba(20, 28, 36, 0.75) !important; */
  /* Semi-transparent dark background for cards */
  border: 1px solid rgba(248, 249, 250, 0.1);
}

.card-header,
.card-footer {
  border-color: rgba(248, 249, 250, 0.1) !important;
}

.nav-tabs .nav-link {
  color: #adb5bd;
}

.nav-tabs .nav-link.active {
  color: #f8f9fa !important;
  background-color: rgba(0, 0, 0, 0.2) !important;
  border-color: rgba(248, 249, 250, 0.1) !important;
}

html,
body {
  height: 100%;
}

body {
  background-color: #000;
  color: #fff;
}

.form-control::placeholder {
  color: #6c757d;
}

.form-control:focus {
  color: var(--bs-warning) !important;
  border-color: var(--bs-secondary) !important;
  box-shadow: 0 0 0 0.25rem rgba(248, 249, 250, 0.25);
}

.barracks-bg {
  background-image: url('../../images/page_bg2.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 100vh;
}

/* Chat Page Layout */
.chat-content-scrollable {
  position: absolute;
  top: 85px;
  /* Height of the fixed header */
  bottom: 95px;
  /* Height of the fixed form */
  left: 0;
  right: 0;
}

.chat-content-scrollable-lg {
  position: absolute;
  top: 85px;
  /* Height of the fixed header */
  bottom: 50px;
  /* Height of the fixed form */
  left: 0;
  right: 0;
}

.chat-form-fixed {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1030;
  /* Ensure it's above other content */
}

a {
  text-decoration: none !important;
  color: inherit !important;
}

/* --- Native Game UI Styles for Barracks --- */

.barracks-header-panel {
  padding: 1rem 1rem 1.5rem 1rem;
  margin-bottom: 1.5rem;
  text-align: center;
  border-bottom: 2px solid rgba(74, 63, 53, 0.1);
  background-color: transparent;
}

.barracks-header-panel h4 {
  color: #4a3f35;
  text-shadow: 1px 1px 0px rgba(255, 255, 255, 0.1);
}

/* Custom Scrollbar for Parchment */
.parchment-content::-webkit-scrollbar {
  width: 8px;
}

.parchment-content::-webkit-scrollbar-track {
  background: rgba(74, 63, 53, 0.1);
  border-radius: 4px;
}

.parchment-content::-webkit-scrollbar-thumb {
  background: #4a3f35;
  border-radius: 4px;
}

.parchment-content::-webkit-scrollbar-thumb:hover {
  background: #6a5f55;
}

.barracks-header-panel {
  background-color: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(5px);
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
}

.barracks-header-panel h2 {
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
}

.barracks-header-panel img {
  width: 80px;
  height: 80px;
}

.text-secondary-shadowed {
  color: var(--bs-secondary) !important;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.barracks-panel {
  position: relative;
  max-width: 750px;
  margin: auto;
}

.building-intro-panel {
  background-color: rgba(10, 10, 10, 0.4);
  /* Darker background */
  backdrop-filter: blur(5px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  /* Slightly brighter border */
  box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.6);
  /* Stronger inner shadow for depth */
  max-width: 750px;
  margin: auto;


}

.building-intro-image {
  max-height: 200px;
  object-fit: contain;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
  /* Drop shadow for the image */
}

.parchment-content {
  height: 100%;
}

.progress-bar {
  background-image: linear-gradient(to bottom, rgba(255, 255, 255, 0.15), rgba(0, 0, 0, 0.15));
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15);
}

.progress-bar-xp {
  background-color: #ffc107 !important;
  /* Bootstrap's warning color for XP */
}

.progress-bar-health {
  background-color: #198754 !important;
  /* Bootstrap's success color for health */
}

.unit-card {
  background-image: url('../../images/paper_texture3.png');
  background-size: cover;
  background-position: center;
  background-clip: padding-box;
  /* Prevents background from extending under the border */
  border: 1px solid var(--bs-secondary);
  color: var(--bs-secondary) !important;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
  border-radius: var(--bs-border-radius-lg);
  padding: 1rem;
  margin-bottom: 1rem;
}

.unit-card input::placeholder{
  color: rgba(var(--bs-secondary-rgb), 0.5) !important;  
  border-color: var(--bs-secondary);
  box-shadow: 0 0 5px rgba(74, 63, 53, 0.5);
} 

.unit-card input {
  color: var(--bs-warning) !important;
  background-color: rgba(255, 255, 255, 0.25);
  border-color: var(--bs-secondary);
  box-shadow: 0 0 5px rgba(74, 63, 53, 0.5);
}

.unit-card input:focus {
  background-color:   rgba(255, 255, 255, 0.25);
}

.unit-entry {
  padding: 20px;
}

.unit-entry h5 {
  color: #4a3f35;
  text-shadow: none;
}

.unit-entry small {
  color: #6a5f55 !important;
}

.fancy-separator {
  border: 0;
  height: 2px;
  background-image: linear-gradient(to right, rgba(74, 63, 53, 0), rgba(74, 63, 53, 0.4), rgba(74, 63, 53, 0));
  margin: 0;
}

/* Game-like Buttons on Parchment */
.barracks-panel .btn {
  border-radius: 3px;
  color: #fff !important;
  border: 1px solid rgba(0, 0, 0, 0.3);
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.4);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 2px 3px rgba(0, 0, 0, 0.3);
  transition: all 0.1s ease-in-out;
}

.barracks-panel .btn:hover {
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 3px 5px rgba(0, 0, 0, 0.4);
}

.barracks-panel .btn:active {
  transform: translateY(1px);
  box-shadow: inset 0 2px 2px rgba(0, 0, 0, 0.4);
}

.barracks-panel .btn-primary {
  background-color: #5a7e9a;
  border-color: #4a6e8a;
}

.barracks-panel .btn-success {
  background-color: #6a9a5a;
  border-color: #5a8a4a;
}

.barracks-panel .btn-danger {
  background-color: #b85a5a;
  border-color: #a84a4a;
}

/* Override Bootstrap contextual colors for dark theme */
.text-success {
  color: #28a745 !important;
  /* A brighter green */
}

.progress-thin {
  height: 5px;
}

.upgrade-icon {
  width: 20px;
  height: 20px;
}

/*# sourceMappingURL=app.css.map */

.unit-row:nth-child(2n-1) {
  background-color: #e7e7e7;
  margin-top: 6px;
  margin-bottom: 6px;
}

.unit-row:nth-child(2n) {
  border: 1px solid #e7e7e7;
  border-radius: var(--bs-border-radius-lg) !important;
  margin-top: 6px;
  margin-bottom: 6px;
}

.transparent-table * {
  background-color: transparent !important;
}

.building-intro-panel .table> :not(caption)>*>* {
  background-color: transparent !important;
  color: white;
}

.parchment-content .list-group-flush .list-group-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.parchment-content .list-group-flush .list-group-item:last-child {
  border-bottom: none;
}

body.loading {
  overflow: hidden;
}

#loading {
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  font-weight: bold;
  font-size: 22px;
  z-index: 9999;
}

.turbo-progress-bar {
  visibility: hidden;
}

:root {
  overscroll-behavior: none;
}

/* Thematic UI Overhaul */
.themed-header, .themed-footer {
  background-color: #6B4F35 !important; /* Dark wood color */
  background-image: linear-gradient(to right, #6B4F35, #8a6e52, #6B4F35);
  border-color: #4A3F35 !important; /* Darker wood for border */
  box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
}

.themed-footer {
    border-top-width: 4px !important;
    border-top-style: solid !important;
}

.themed-header {
    border-bottom-width: 4px !important;
    border-bottom-style: solid !important;
}

/* Update resource bar style */
.resource-header {
    background-color: rgba(0,0,0,0.3) !important;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.5);
}

/* Update header buttons */
.themed-header .btn-primary {
    background-color: #8c6d4f;
    border: 1px solid #5a4a3a;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.1);
}

/* Update footer icons */
.themed-footer img {
    filter: drop-shadow(2px 2px 2px rgba(0,0,0,0.7));
}

.unit_img_lg {
  height: 200px;
  width: 150px;
  object-fit: contain;
  object-position: center;
  border: 1px solid rgba(var(--bs-secondary-rgb), 0.7);
  border-radius: var(--bs-border-radius-lg);
}

.unit_img {
  height: 160px;
  width: 120px;
  object-fit: contain;
  object-position: center;
  border: 1px solid rgba(var(--bs-secondary-rgb), 0.7);
  border-radius: var(--bs-border-radius-lg);
}

.unit_img_sm {
  height: 120px;
  width: 90px;
  object-fit: contain;
  object-position: center;
  border: 1px solid rgba(var(--bs-secondary-rgb), 0.7);
  border-radius: var(--bs-border-radius-lg);
}

/* --- Map Styles --- */


.leaflet-control-layers {
  background: rgba(40, 40, 40, 0.8) !important;
  border: 1px solid var(--bs-secondary) !important;
  border-radius: var(--bs-border-radius-lg);
  padding: 10px;
}

.leaflet-control-layers-selector {
  color: white !important;
}

/* Map Controllers - Layer Control Integration */
#layer-control-container {
    position: relative;
}

#layer-control-container .leaflet-control-layers {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
    position: static !important;
}

#layer-control-container .leaflet-control-layers-toggle {
    display: none !important;
}

#layer-control-container .leaflet-control-layers-list {
    color: white;
    background: rgba(40, 40, 40, 0.95) !important;
    border: 1px solid var(--bs-secondary) !important;
    border-radius: var(--bs-border-radius);
    padding: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    position: absolute !important;
    bottom: 100%;
    right: 0;
    margin-bottom: 8px;
    min-width: 220px;
}

/* Clan Filter Section */
#layer-control-container .clan-filter-section {
    margin-bottom: 12px;
}

#layer-control-container .clan-filter-section .form-select {
    background-color: rgba(60, 60, 60, 0.9) !important;
    border-color: rgba(var(--bs-secondary-rgb), 0.5) !important;
    color: white !important;
    font-size: 13px;
    padding: 6px 10px;
}

#layer-control-container .clan-filter-section .form-select:focus {
    border-color: var(--bs-secondary) !important;
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-secondary-rgb), 0.25) !important;
}

#layer-control-container .clan-filter-section .form-select option {
    background-color: rgb(40, 40, 40);
    color: white;
}

/* Section Titles */
#layer-control-container .layer-section-title {
    color: var(--bs-secondary);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(var(--bs-secondary-rgb), 0.3);
}

/* Layer Checkboxes */
#layer-control-container .leaflet-control-layers-overlays {
    margin-top: 0;
}

#layer-control-container .leaflet-control-layers-overlays label {
    color: white;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    padding: 4px 0;
    transition: color 0.2s ease;
}

#layer-control-container .leaflet-control-layers-overlays label:hover {
    color: var(--bs-secondary);
}

#layer-control-container .leaflet-control-layers-overlays input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
}

/* Map Labels - Prevent disappearing during zoom */
.leaflet-zoom-anim .leaflet-zoom-animated {
    transition: transform 0.25s cubic-bezier(0,0,0.25,1) !important;
}

.leaflet-tooltip {
    transition: none !important;
    will-change: transform;
}

.map-label {
    pointer-events: none;
    white-space: nowrap;
    background: linear-gradient(135deg, rgba(218, 165, 32, 0.95), rgba(184, 134, 11, 0.95)) !important;
    border: 1px solid rgba(255, 215, 0, 0.8) !important;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    color: #1a1a1a !important;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.3);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4), 
                0 1px 3px rgba(0, 0, 0, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.3);
                padding: 2px 4px !important;
}

.map-label::before {
    display: none !important;
}

/* Map Search Input and Results */
#location-search {
    background-color: rgba(156, 156, 156, 0.6) !important;
    border-color: var(--bs-secondary) !important;
    color: white !important;
}

#location-search::placeholder {
    color: rgba(255, 255, 255, 0.5) !important;
}

/* Map Container - Dark background to prevent white borders */
.leaflet-container {
    background-color: #1a1a1a !important;
    background-image: 
        radial-gradient(circle at 20% 50%, rgba(40, 40, 40, 0.3) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(50, 50, 50, 0.2) 0%, transparent 50%);
}

/* Leaflet pane background */
.leaflet-pane {
    background-color: transparent;
}

/* Global Loading Overlay - Used for both page transitions and map loading */
.global-loading,
.map-loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

.map-loading {
    position: absolute;
    z-index: 1000;
}

.global-loading-content,
.map-loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: linear-gradient(135deg, rgba(40, 40, 40, 0.9), rgba(20, 20, 20, 0.9));
    border-radius: 12px;
    border: 2px solid rgba(255, 193, 7, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.global-loading .spinner-border,
.map-loading .spinner-border {
    border-width: 0.4rem;
}

#search-results-list {
  background-color: rgba(156, 156, 156, 0.6) !important;
  border: 1px solid var(--bs-secondary);
    border-radius: var(--bs-border-radius);
}

#search-results-list .list-group-item {
    background-color: transparent !important;
    border-color: rgba(var(--bs-secondary-rgb), 0.3) !important;
}

#search-results-list .list-group-item:hover {
    background-color: rgba(var(--bs-secondary-rgb), 0.2) !important;
}

.drop-shadow-secondary {
  filter: drop-shadow(0px 0px 6px rgba(var(--bs-secondary-rgb), 0.5));
}


.nav-tabs .nav-item .nav-link.active {
 color: black;
 background-color: rgba(var(--bs-secondary-rgb), 0.7) !important;
}