/* Utilities CSS - Replaces Nicepage utility classes */
/* Created: 2025-12-16 - Part of Nicepage removal migration */

/* ==========================================================================
   Layout Utilities
   ========================================================================== */

/* Clearfix utility */
.aci-clearfix::before,
.aci-clearfix::after {
  content: '';
  display: table;
}

.aci-clearfix::after {
  clear: both;
}

/* Container/Sheet utilities */
.aci-sheet {
  position: relative;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 15px;
}

@media (min-width: 1200px) {
  .aci-sheet {
    max-width: 1140px;
  }
}

@media (min-width: 992px) and (max-width: 1199px) {
  .aci-sheet {
    max-width: 960px;
  }
}

@media (min-width: 768px) and (max-width: 991px) {
  .aci-sheet {
    max-width: 720px;
  }
}

@media (min-width: 576px) and (max-width: 767px) {
  .aci-sheet {
    max-width: 540px;
  }
}

@media (max-width: 575px) {
  .aci-sheet {
    max-width: 100%;
  }
}

/* Section utility */
.aci-section {
  padding: 60px 0;
  position: relative;
}

/* ==========================================================================
   Visibility Utilities (Mobile-First)
   ========================================================================== */

.aci-hidden {
  display: none !important;
}

/* Hide on extra-small screens (phones) */
@media (max-width: 575px) {
  .aci-hidden-xs {
    display: none !important;
  }
}

/* Hide on small screens (tablets) */
@media (max-width: 767px) {
  .aci-hidden-sm {
    display: none !important;
  }
}

/* Hide on medium screens (tablets/small desktops) */
@media (max-width: 991px) {
  .aci-hidden-md {
    display: none !important;
  }
}

/* Hide on large screens (desktops) */
@media (min-width: 992px) {
  .aci-hidden-lg {
    display: none !important;
  }
}

/* ==========================================================================
   Border Utilities
   ========================================================================== */

.aci-border-0 {
  border-width: 0 !important;
}

.aci-border-1 {
  border-width: 1px !important;
  border-style: solid;
}

.aci-border-2 {
  border-width: 2px !important;
  border-style: solid;
}

.aci-border-grey {
  border-color: #ddd;
}

.aci-border-grey-30 {
  border-color: #e0e6ec;
}

/* ==========================================================================
   Spacing Utilities
   ========================================================================== */

.aci-spacing-10 {
  margin: 10px;
}

.aci-spacing-15 {
  margin: 15px;
}

.aci-spacing-20 {
  margin: 20px;
}

/* ==========================================================================
   Alignment Utilities
   ========================================================================== */

.aci-align-center {
  text-align: center !important;
}

.aci-align-left {
  text-align: left !important;
}

.aci-align-right {
  text-align: right !important;
}

.aci-container-align-center {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* ==========================================================================
   Color Utilities
   ========================================================================== */

.aci-white {
  background-color: #ffffff;
}

.aci-bg-white {
  background-color: #ffffff !important;
}

/* ==========================================================================
   Body Base Styles
   ========================================================================== */

.aci-body {
  font-size: 1rem;
  line-height: 1.6;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  color: #111111;
  background-color: #ffffff;
  margin: 0;
  padding: 0;
}

.aci-body h1,
.aci-body h2,
.aci-body h3,
.aci-body h4,
.aci-body h5,
.aci-body h6 {
  font-family: Montserrat, sans-serif;
  padding: 0;
  margin-top: 0;
  margin-bottom: 0.5rem;
}

/* ==========================================================================
   Component-Specific Utilities
   ========================================================================== */

/* Divider/Horizontal Line */
.aci-divider {
  border-top: 1px solid var(--border, #e0e6ec);
  width: 100%;
  height: 0;
  margin: 1rem 0;
}

/* Flag links */
.aci-flag-link {
  color: #35506d;
  text-decoration: none;
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  transition: color 0.2s ease;
  display: inline-block;
}

.aci-flag-link:hover,
.aci-flag-link:focus {
  color: var(--hover, #de4640);
  text-decoration: none;
}

.aci-flag-link:active {
  color: var(--hover, #de4640);
}

/* SVG utilities */
.aci-svg-link,
.aci-svg-content {
  display: block;
  width: 100%;
  height: 100%;
}

/* ==========================================================================
   Text Utilities
   ========================================================================== */

.aci-text {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
  line-height: 1.6;
}

.text-strong {
  font-weight: 600;
}

/* ==========================================================================
   Global Typography Fixes
   ========================================================================== */

/* Global h3 styling */
h3 {
  font-size: 1.25rem;
  font-weight: 500;
  line-height: 1.2;
  margin-top: 0;
  margin-bottom: 0.5rem;
}

/* Global placeholder styling - lower font weight */
::placeholder {
  opacity: 0.70;
  font-weight: 400 !important;
  font-size: inherit !important;
}

::-webkit-input-placeholder {
  opacity: 0.70;
  font-weight: 400 !important;
  font-size: inherit !important;
}

:-ms-input-placeholder {
  opacity: 0.70;
  font-weight: 400 !important;
  font-size: inherit !important;
}

::-moz-placeholder {
  opacity: 0.70;
  font-weight: 400 !important;
  font-size: inherit !important;
}

/* Global select/dropdown styling - Montserrat font and lower font weight */
select {
  font-family: 'Montserrat', sans-serif !important;
  font-weight: 600 !important;
}

select option {
  font-weight: 400 !important;
  font-size: inherit !important;
}

/* Global link styling for content areas */
.brand-description a,
.model-description a,
.quiz-description a {
  color: #de4640;
  text-decoration: underline;
  font-weight: 600;
  transition: color 0.2s ease;
}

.brand-description a:hover,
.model-description a:hover,
.quiz-description a:hover {
  color: #b93832;
}

/* Text justification for descriptions */
.brand-description,
.model-description,
.quiz-description {
  text-align: justify;
}

/* Fix 8: Form fields font-family - use Inter */
.contact-input,
.contact-textarea,
.model-input,
.model-textarea,
.model-select,
.search-input,
.search-select {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif !important;
}

/* Fix 9: Hide model page popularity stars */
.model-stars,
.model-popularity-stars {
  display: none !important;
}

/* Fix 11: Leaderboard font weight reduction */
.leaderboard-player-name,
.leaderboard-score,
.lb-player,
.lb-score {
  font-weight: 600 !important;
}

/* Leaderboard scores with Roboto Mono */
.leaderboard-score,
.lb-score {
  font-family: 'Roboto Mono', 'Courier New', Courier, monospace !important;
}

/* Fix 17: Search form button hover colors */
.search-submit-btn:hover,
.search-clear-btn:hover {
  background-color: #de4640 !important;
  border-color: #de4640 !important;
  color: #fff !important;
}

/* Fix 18: Model submit success button hovers */
.submit-success-home:hover,
.submit-success-another:hover {
  background-color: #de4640 !important;
  border-color: #de4640 !important;
  color: #fff !important;
  transform: translateY(-1px);
}

/* ==========================================================================
   Test Knowledge Section - Common Component
   ========================================================================== */
.tk-section{
  background: #fff;
  padding: 1.5rem 0 2rem;
}

.tk-inner{
  width: min(1240px, 95%);
  margin: 0 auto;
}

.tk-card{
  background: #fff !important;
  border: 1px solid #e0e6ec;
  border-radius: 14px;
  padding: 1.25rem 1.15rem 1.15rem;
  box-shadow: 0 10px 26px rgba(48, 72, 98, .10);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.tk-kicker{
  display: inline-block;
  margin: 0 0 .75rem;
  color: #6b869c;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  font-size: .78rem;
}

.tk-title{
  margin: 0 auto 1rem;
  max-width: 64ch;
  color: #304862;
  font-weight: 700;
  font-size: clamp(1.05rem, 1.3vw, 1.2rem);
  line-height: 1.35;
}

.tk-accent{
  color: #de4640;
  font-weight: 700;
}

.tk-actions{
  display: flex;
  justify-content: center;
  gap: .75rem;
  flex-wrap: wrap;
}

.tk-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  padding: .75rem 1.05rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  font-size: .8rem;
  transition: background .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}

.tk-btn .chev{
  width: 18px;
  height: 18px;
  display: block;
}

.tk-btn-primary{
  background: #304862;
  color: #fff !important;
  border: 1px solid rgba(255,255,255,.18);
}

.tk-btn-primary:hover{
  background: #de4640;
  color: #fff !important;
  transform: translateY(-1px);
}

.tk-btn-ghost{
  background: #fff;
  color: #304862;
  border: 1px solid rgba(48,72,98,.18);
}

.tk-btn-ghost:hover{
  color: #de4640;
  border-color: rgba(222,70,64,.35);
  transform: translateY(-1px);
}

@media (max-width: 768px){
  .tk-inner{ width: min(1240px, 92%); }
  .tk-btn{ width: 100%; }
}

/* ==========================================================================
   Recently Added Section - Common Component
   ========================================================================== */
.ra-section{
  background: #fff;
  padding: 1.25rem 0 2rem;
}

.ra-inner{
  width: min(1240px, 95%);
  margin: 0 auto;
}

.ra-card{
  background: #f7f9fb;
  border: 1px solid #e0e6ec;
  border-radius: 14px;
  padding: 1.15rem 1.15rem 1.25rem;
  box-shadow: 0 8px 20px rgba(48, 72, 98, .10);
}

.ra-title{
  margin: 0 0 1rem;
  text-align: center;
  color: #304862;
  font-weight: 700;
  letter-spacing: .6px;
  text-transform: uppercase;
  font-size: 1.05rem;
}

.ra-links{
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .85rem;
}

.ra-link{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  padding: .8rem .9rem;
  border-radius: 999px;
  text-decoration: none;
  background: #fff;
  border: 1px solid rgba(48,72,98,.16);
  color: #304862;
  font-weight: 700;
  letter-spacing: .3px;
  text-transform: uppercase;
  font-size: .82rem;
  transition: transform .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease;
}

.ra-link .chev{
  width: 18px;
  height: 18px;
  display: block;
}

.ra-link:hover{
  color: #de4640;
  border-color: rgba(222,70,64,.35);
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(48,72,98,.12);
}

@media (max-width: 900px){
  .ra-links{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 520px){
  .ra-inner{ width: min(1240px, 92%); }
  .ra-links{ grid-template-columns: 1fr; }
  .ra-link{ justify-content: space-between; padding: .85rem 1rem; }
}

/* ==========================================================================
   ShareThis Buttons - Common Component
   ========================================================================== */
.share-buttons{
  margin: 1.25rem 0;
}
