/*
 * MafiaManiac — Bootstrap 3 Shim
 * Replaces bootstrap.min.css (~30kb) with only the classes
 * actually used in the HTML template (~3kb).
 *
 * Coverage derived from class audit of mafiamaniac-v2.html.
 * Bootstrap JS (dropdowns, modals, affix) still loads separately
 * and is unaffected by this CSS replacement.
 *
 * Classes covered:
 *   Layout:     .container, .row, .col-*, .pull-left/right,
 *               .text-center/left/right, .full-wrap
 *   Nav:        .navbar, .navbar-nav, .navbar-left/right,
 *               .navbar-collapse, .collapse, .nav
 *   Dropdown:   .dropdown, .dropdown-toggle, .dropdown-menu,
 *               .dropdown-menu-right, .divider, .open
 *   Buttons:    .btn, .btn-primary, .btn-group, .caret
 *   Modal:      .modal, .modal-dialog, .modal-content,
 *               .modal-header/body/footer, .modal-title,
 *               .fade, .close
 *   Badge:      .badge
 *   Images:     .img-circle, .img-round, .img-thumbnail
 */


/* ============================================================
   RESET
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
}

/* Browser default 8px body margin causes background bleed — zero it out */
html, body {
  margin: 0;
  padding: 0;
}


/* ============================================================
   LAYOUT
   ============================================================ */
.full-wrap {
  width: 100%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Main content grows to fill space, pushing footer down */
.full-wrap > .container {
  flex: 1;
}

/* Footer element itself fills its flex slot edge to edge */
.full-wrap > footer {
  background: rgba(46, 46, 46, 0.92);
}

/* Remove the top margin that creates a gap above the gray box */
.full-wrap > footer .footer {
  margin-top: 0;
}

.container {
  width: 100%;
  max-width: 1170px;
  margin-right: auto;
  margin-left: auto;
  padding-right: 15px;
  padding-left: 15px;
}

.row {
  display: flex;
  flex-wrap: wrap;
  margin-right: -15px;
  margin-left: -15px;
}

/* Columns — only the three used in userCard-tmpl */
.col-xs-6,
.col-sm-6,
.col-md-6 {
  position: relative;
  width: 50%;
  padding-right: 15px;
  padding-left: 15px;
}

.pull-left  { float: left  !important; }
.pull-right { float: right !important; }

.text-left   { text-align: left   !important; }
.text-center { text-align: center !important; }
.text-right  { text-align: right  !important; }


/* ============================================================
   NAV / NAVBAR
   ============================================================ */
.nav {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav > li {
  position: relative;
  display: block;
}

.nav > li > a {
  display: block;
  padding: 10px 15px;
  text-decoration: none;
}

.navbar {
  position: relative;
  min-height: 50px;
  margin-bottom: 0;
}

/* Flex container for left/right nav groups */
.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
}

.navbar-left,
.navbar-right {
  display: flex;
  align-items: stretch;  /* stretch so all li items fill full navbar height */
}

.navbar-nav {
  display: flex;
  flex-direction: row;
  list-style: none;
  margin: 0;
  padding: 0;
}

/* Each li fills bar height so top:100% on dropdowns lands consistently */
.navbar-nav > li {
  position: relative;
  display: flex;
  align-items: center;
}

.navbar-nav > li > a {
  display: flex;
  align-items: center;
  padding: 0 20px;
  height: 100%;
  text-decoration: none;
}

/* Collapse — on desktop everything is always visible */
.collapse { display: block !important; }
.navbar-collapse {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0;
  border: none;
  box-shadow: none;
}


/* ============================================================
   DROPDOWN
   ============================================================ */
.dropdown {
  position: relative;
}

.dropdown-toggle {
  cursor: pointer;
}

/* Bootstrap JS adds .open to the li when active */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 1000;
  display: none;
  list-style: none;
  margin-top: 0;   /* override any margin from main CSS */
  padding: 0;
}

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

.open > .dropdown-menu {
  display: block;
}

.dropdown-menu > li > a {
  display: block;
  white-space: nowrap;
  text-decoration: none;
}

.divider {
  height: 1px;
  margin: 4px 0;
  overflow: hidden;
}


/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-block;
  padding: 6px 12px;
  margin-bottom: 0;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.42857;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  cursor: pointer;
  user-select: none;
  border: 1px solid transparent;
  border-radius: 4px;
  text-decoration: none;
}

.btn:hover,
.btn:focus {
  text-decoration: none;
}

.btn-group {
  position: relative;
  display: inline-flex;
  vertical-align: middle;
}

.btn-group > .btn {
  position: relative;
  flex: 0 1 auto;
}

.btn-group > .btn:not(:first-child) {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.btn-group > .btn:not(:last-child) {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

/* Caret used in dropdown-toggle buttons */
.caret {
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 2px;
  vertical-align: middle;
  border-top:   4px dashed currentColor;
  border-right: 4px solid transparent;
  border-left:  4px solid transparent;
}


/* ============================================================
   BADGE
   ============================================================ */
.badge {
  display: inline-block;
  min-width: 10px;
  padding: 3px 7px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  border-radius: 10px;
}


/* ============================================================
   MODAL
   ============================================================ */
.modal {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1050;
  display: none;
  overflow-x: hidden;
  overflow-y: auto;
  outline: 0;
}

/* Bootstrap JS toggles display; .fade/.in handles the opacity transition */
.modal.fade .modal-dialog {
  transition: transform 0.3s ease-out;
  transform: translateY(-25%);
}

.modal.in .modal-dialog {
  transform: translateY(0);
}

.modal-dialog {
  position: relative;
  width: auto;
  max-width: 600px;
  margin: 30px auto;
}

.modal-content {
  position: relative;
  border-radius: 4px;
  outline: 0;
}

.modal-header {
  padding: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.modal-header::after {
  content: '';
  display: table;
  clear: both;
}

.modal-title {
  margin: 0;
  line-height: 1.42857;
}

.modal-body {
  position: relative;
  padding: 15px;
}

.modal-footer {
  padding: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: right;
}

.modal-footer::after {
  content: '';
  display: table;
  clear: both;
}

/* Modal backdrop — Bootstrap JS appends this to body */
.modal-backdrop {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1040;
  background-color: #000;
  opacity: 0;
  transition: opacity 0.15s linear;
}

.modal-backdrop.in {
  opacity: 0.5;
}

/* Close button */
.close {
  float: right;
  font-size: 21px;
  font-weight: 700;
  line-height: 1;
  opacity: 0.2;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  appearance: none;
}

.close:hover,
.close:focus {
  opacity: 0.5;
}


/* ============================================================
   IMAGES
   ============================================================ */
.img-circle    { border-radius: 50%; }
.img-round     { border-radius: 6px; }
.img-thumbnail {
  padding: 4px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 4px;
  max-width: 100%;
  height: auto;
}


/* ============================================================
   AFFIX (used by navbar scroll behaviour)
   Bootstrap JS adds/removes .affix — no extra CSS needed here
   beyond what's already in mafiamaniac-v2.css
   ============================================================ */


/* ============================================================
   RESPONSIVE — collapse navbar on small screens
   Bootstrap JS handles the toggle; we just need the breakpoint
   ============================================================ */
@media (max-width: 767px) {
  .container {
    padding-right: 10px;
    padding-left: 10px;
  }

  .navbar .container {
    flex-wrap: wrap;
    height: auto;
  }

  .navbar-collapse {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
  }

  .navbar-nav {
    flex-direction: column;
    width: 100%;
  }

  .navbar-left,
  .navbar-right {
    width: 100%;
  }

  .col-xs-6,
  .col-sm-6 {
    width: 100%;
  }

  .modal-dialog {
    margin: 10px;
    max-width: calc(100% - 20px);
  }
}