/*
 * This is a manifest file that'll be compiled into application.css.
 *
 * With Propshaft, assets are served efficiently without preprocessing steps. You can still include
 * application-wide styles in this file, but keep in mind that CSS precedence will follow the standard
 * cascading order, meaning styles declared later in the document or manifest will override earlier ones,
 * depending on specificity.
 *
 * Consider organizing styles into separate files for maintainability.
 */

/* ==========================================================================
   HTMX Loading Indicators
   Used by category/search/video loading across ~10 view files.
   ========================================================================== */

.htmx-indicator{
  opacity: 0;
  display: none;
  transition: opacity 2000ms ease-in;
  transition: display 2000ms;
}
.htmx-request .htmx-indicator{
  opacity: 1;
  display: block;
}
.htmx-request.htmx-indicator{
  opacity:1;
  display: block;
}
.htmx-request .htmx-loaded-content {
  display: none;
}
.htmx-request.htmx-loaded-content {
  display: none;
}

/* ==========================================================================
   Modal Dialogs
   Used by Spree store and admin views for overlays.
   ========================================================================== */

.regular-modal {
	position: fixed;
	top:0px;
	bottom: 0px;
	left:0px;
	right:0px;
	background-color:rgba(0,0,0,0.5);
	z-index:1000;
	display:flex;
	flex-direction:column;
	align-items:center;
	animation-name: fadeIn;
	animation-duration:150ms;
	animation-timing-function: ease;
}

.regular-modal > .modal-underlay {
	position: absolute;
	z-index: -1;
	top:0px;
	bottom:0px;
	left: 0px;
	right: 0px;
}

.regular-modal > .modal-content {
	margin-top:10vh;
	width:80%;
	max-width:600px;
	border:solid 1px #999;
	border-radius:8px;
	box-shadow: 0px 0px 20px 0px rgba(0,0,0,0.3);
	background-color:white;
	padding:20px;
	animation-name:zoomIn;
	animation-duration:150ms;
	animation-timing-function: ease;
}

.regular-modal.closing {
	animation-name: fadeOut;
	animation-duration:150ms;
	animation-timing-function: ease;
}

.regular-modal.closing > .modal-content {
	animation-name: zoomOut;
	animation-duration:150ms;
	animation-timing-function: ease;
}

.fullpage-modal {
	position: fixed;
	top:0px;
	bottom: 0px;
	left:0px;
	right:0px;
	z-index:1000;
  overflow-y: scroll;
	display:flex;
	flex-direction:column;
	align-items:center;
	animation-name: fadeIn;
	animation-duration:150ms;
	animation-timing-function: ease;
}

.fullpage-modal > .modal-underlay {
	position: absolute;
	z-index: -1;
	top:0px;
	bottom:0px;
	left: 0px;
	right: 0px;
}

.fullpage-modal > .modal-content {
	margin-top:2vh;
	width:90%;
	border:solid 1px #999;
	border-radius:8px;
	box-shadow: 0px 0px 20px 0px rgba(0,0,0,0.3);
	padding:20px;
	animation-name:zoomIn;
	animation-duration:150ms;
	animation-timing-function: ease;
}

.fullpage-modal.closing {
	animation-name: fadeOut;
	animation-duration:150ms;
	animation-timing-function: ease;
}

.fullpage-modal.closing > .modal-content {
	animation-name: zoomOut;
	animation-duration:150ms;
	animation-timing-function: ease;
}

.fullscreen-modal {
	position: fixed;
	top:0px;
	bottom: 0px;
	left:0px;
	right:0px;
  overflow-y: scroll;
	z-index:1000;
	display:flex;
	flex-direction:column;
	align-items:center;
	animation-name: fadeIn;
	animation-duration:150ms;
	animation-timing-function: ease;
}

.fullscreen-modal > .modal-underlay {
	position: absolute;
	z-index: -1;
	top:0px;
	bottom:0px;
	left: 0px;
	right: 0px;
}

.fullscreen-modal > .modal-content {
	margin-top: 0px;
	width:100%;
	border: none;
	padding:20px;
	animation-name:zoomIn;
	animation-duration:150ms;
	animation-timing-function: ease;
}

.fullscreen-modal.closing {
	animation-name: fadeOut;
	animation-duration:150ms;
	animation-timing-function: ease;
}

.fullscreen-modal.closing > .modal-content {
	animation-name: zoomOut;
	animation-duration:150ms;
	animation-timing-function: ease;
}

@keyframes fadeIn {
	0% {opacity: 0;}
	100% {opacity: 1;}
}

@keyframes fadeOut {
	0% {opacity: 1;}
	100% {opacity: 0;}
}

@keyframes zoomIn {
	0% {transform: scale(0.9);}
	100% {transform: scale(1);}
}

@keyframes zoomOut {
	0% {transform: scale(1);}
}

/* Turbo Frame modal body lock */
body.modal-open {
  overflow: hidden;
  scrollbar-gutter: stable;
}

/* ==========================================================================
   Bootstrap-Compatible Button Classes
   Used extensively in admin and Spree store views (~56 files).
   Will be replaced when admin is redesigned with maquina components.
   ========================================================================== */

.btn, .btn-primary, .btn-secondary, .btn-success, .btn-danger, .btn-warning, .btn-info, .btn-light, .btn-dark, .btn-plain {
  display: inline-block;
  font-weight: 400;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  user-select: none;
  background-color: #f8f9fa;
  border: 1px solid #000000;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
  border-radius: 0.25rem;
  transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  color: #212529;
  text-decoration: none;
}

.btn:hover, .btn-primary:hover, .btn-secondary:hover, .btn-success:hover, .btn-danger:hover, .btn-warning:hover, .btn-info:hover, .btn-light:hover, .btn-dark:hover, .btn-plain:hover {
  background-color: #e2e6ea;
  border-color: #dae0e5;
  text-decoration: none;
}

.btn:focus, .btn.focus, .btn-primary:focus, .btn-primary.focus, .btn-secondary:focus, .btn-secondary.focus, .btn-success:focus, .btn-success.focus, .btn-danger:focus, .btn-danger.focus, .btn-warning:focus, .btn-warning.focus, .btn-info:focus, .btn-info.focus, .btn-light:focus, .btn-light.focus, .btn-dark:focus, .btn-dark.focus, .btn-plain:focus, .btn-plain.focus {
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(248, 249, 250, 0.5);
}

.btn:not(:disabled):not(.disabled), .btn-primary:not(:disabled):not(.disabled), .btn-secondary:not(:disabled):not(.disabled), .btn-success:not(:disabled):not(.disabled), .btn-danger:not(:disabled):not(.disabled), .btn-warning:not(:disabled):not(.disabled), .btn-info:not(:disabled):not(.disabled), .btn-light:not(:disabled):not(.disabled), .btn-dark:not(:disabled):not(.disabled), .btn-plain:not(:disabled):not(.disabled) {
  cursor: pointer;
}

/* ==========================================================================
   Bootstrap-Compatible Table Classes
   Used in admin and content listing views (~11 files).
   Will be replaced when views are redesigned with Tailwind.
   ========================================================================== */

.table {
  width: 100%;
  margin-bottom: 1rem;
  color: #212529;
  background-color: transparent;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 0.75rem;
  vertical-align: top;
  border-top: 1px solid #dee2e6;
}

.table thead th {
  vertical-align: bottom;
  border-bottom: 2px solid #dee2e6;
}

.table tbody + tbody {
  border-top: 2px solid #dee2e6;
}

.table-bordered {
  border: 1px solid #dee2e6;
}

.table-bordered th,
.table-bordered td {
  border: 1px solid #dee2e6;
}

.table-bordered thead th,
.table-bordered thead td {
  border-bottom-width: 2px;
}

.table-striped tbody tr:nth-of-type(odd) {
  background-color: rgba(0, 0, 0, 0.05);
}

@media (max-width: 575.98px) {
  .table-responsive-sm {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 767.98px) {
  .table-responsive-md {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 991.98px) {
  .table-responsive-lg {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 1199.98px) {
  .table-responsive-xl {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

.table-responsive {
  display: block;
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* ==========================================================================
   DataTables Integration
   Used by admin datatables rendering.
   ========================================================================== */

.dt-container {
  background-color: white;
  color: black;
}
