/* =========================================================
   DRESS SHIRT SIZE CALCULATOR
   File: dress-shirt-size-calculator.css
   ========================================================= */


/* =========================================================
   RESET AND BASE STYLES
   Matches the original site stylesheet
   ========================================================= */

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  box-sizing: border-box;
  overflow-x: hidden;

  background-color: #F5F5F5;
  color: #333333;

  font-family: Arial, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

html {
  scroll-behavior: smooth;
}

img {
  max-width: 100%;
}

button,
input {
  font: inherit;
}

button:focus-visible,
input:focus-visible,
a:focus-visible,
.toggle-label:focus-visible,
.info:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(31, 79, 122, 0.35);
  outline-offset: 3px;
}


/* =========================================================
   HEADER AND NAVIGATION
   Original site styling
   ========================================================= */

header {
  position: fixed;
  top: 0;
  left: 0;

  width: 100%;
  height: 70px;
  padding: 0 20px;

  z-index: 2000;

  display: flex;
  align-items: center;
  justify-content: space-between;

  background-color: #FFFFFF;
  color: #000000;
  border-bottom: 2px solid #000000;
}

.header-container {
  flex: 1;

  display: flex;
  align-items: center;
  justify-content: space-between;

  height: 100%;
}

.header-container h1 {
  margin: 0;
  font-size: 24px;
}


/* =========================================================
   DESKTOP NAVIGATION
   Original site styling
   ========================================================= */

header nav {
  height: 100%;
}

header nav > ul#nav-menu {
  display: flex;
  align-items: center;
  gap: 20px;

  height: 100%;
  margin: 0;
  padding: 0 20px;

  overflow-x: auto;

  background-color: transparent;
  color: #000000;
  list-style: none;
}

header nav > ul#nav-menu li {
  margin: 0;
  padding: 0;
}

header nav > ul#nav-menu a {
  display: inline-flex;
  align-items: center;

  padding: 0.75em 1em;

  color: #000000;
  font-size: 1.125rem;
  font-weight: normal;
  text-decoration: none;

  border-radius: 6px;

  transition: background-color 0.3s;
}

header nav > ul#nav-menu a:hover,
header nav > ul#nav-menu a:focus {
  background-color: #EAEAEA;
  color: #000000;
}


/* =========================================================
   HAMBURGER BUTTON
   Original site styling
   ========================================================= */

#hamburger {
  display: none;

  position: fixed;
  top: 18px;
  right: 20px;

  width: 36px;
  height: 36px;
  padding: 0;

  z-index: 2100;

  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;

  background: none;
  border: none;
  cursor: pointer;
}

#hamburger span {
  width: 100%;
  height: 4px;

  background-color: #000000;
  border-radius: 2px;
}


/* =========================================================
   HEADER LOGOS
   Original site styling
   ========================================================= */

.logo-desktop {
  display: block;
}

.logo-mobile {
  display: none;
}


/* =========================================================
   PAGE INTRODUCTION
   ========================================================= */

.page-intro {
  width: 100%;
  max-width: 900px;
  margin: 70px auto 0;
  padding: 35px 20px 15px;

  text-align: center;
}

.page-intro h1 {
  margin: 0 0 12px;

  color: #1F1F1F;
  font-size: clamp(2rem, 5vw, 3rem);
  line-height: 1.15;
}

.page-intro p {
  max-width: 680px;
  margin: 0 auto;

  color: #333333;
  font-size: 1.05rem;
  line-height: 1.6;
}


/* =========================================================
   MAIN CALCULATOR LAYOUT
   ========================================================= */

main {
  width: 100%;
  margin: 0;
  padding: 25px 20px 45px;

  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 60px;
}


/* =========================================================
   CALCULATOR PANEL
   ========================================================= */

.calculator {
  width: 100%;
  max-width: 500px;
  padding: 40px;

  background-color: #FFFFFF;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.section-title {
  margin: 0 0 20px;

  color: #1F1F1F;
  font-size: 2.5em;
  line-height: 1.2;
  text-align: center;
}

.calculator form {
  width: 100%;
}


/* =========================================================
   FORM ELEMENTS
   ========================================================= */

.calculator label {
  display: block;
  margin: 15px 0 5px;

  color: #333333;
  font-size: 18px;
  line-height: 1.4;
}

.calculator label strong {
  color: #1F1F1F;
}

.calculator input[type="number"] {
  width: 100%;
  margin-bottom: 20px;
  padding: 14px;

  background-color: #FFFFFF;
  border: 1px solid #B0B0B0;
  border-radius: 6px;

  color: #333333;
  font-size: 18px;
}

.calculator input[type="number"]:hover {
  border-color: #808080;
}

.calculator input[type="number"]:focus {
  border-color: #1F4F7A;
  box-shadow: 0 0 0 3px rgba(31, 79, 122, 0.14);
  outline: none;
}

.calculator input[type="number"][aria-invalid="true"] {
  border-color: #B00020;
  box-shadow: 0 0 0 3px rgba(176, 0, 32, 0.12);
}

.calculator input[type="number"]::placeholder {
  color: #818181;
  opacity: 1;
}

.calculator small {
  display: block;
  margin: -13px 0 17px;

  color: #626262;
  font-size: 0.84rem;
  line-height: 1.45;
}


/* =========================================================
   HEIGHT FIELDS
   ========================================================= */

.height-wrapper {
  display: flex;
  gap: 50px;
  margin-bottom: 0;
}

.height-field {
  flex: 1;
  min-width: 0;
}

.height-field label {
  min-height: 26px;
}


/* =========================================================
   UNIT TOGGLE
   ========================================================= */

.unit-toggle {
  display: flex;
  margin-bottom: 20px;

  overflow: hidden;

  border: 1px solid #B0B0B0;
  border-radius: 6px;
}

.toggle-label {
  flex: 1;
  padding: 16px 0;

  background-color: #F5F5F5;
  color: #4A4A4A;
  cursor: pointer;

  font-size: 18px;
  line-height: 1.2;
  text-align: center;
  user-select: none;

  transition: background-color 0.3s;
}

.toggle-label + .toggle-label {
  border-left: 1px solid #B0B0B0;
}

.toggle-label:hover {
  background-color: #E5E5E5;
}

.toggle-label.active {
  background-color: #333333;
  color: #FFFFFF;
}


/* =========================================================
   INFORMATION TOOLTIPS
   ========================================================= */

.info {
  display: inline-block;
  position: relative;

  margin-left: 5px;
  padding: 2px 6px;

  background-color: #DDDDDD;
  border-radius: 50%;

  color: #333333;
  cursor: help;

  font-size: 0.8em;
  font-style: normal;
  line-height: 1.2;
}

.info:hover::after,
.info:focus::after {
  content: attr(data-tooltip);

  position: absolute;
  left: 50%;
  bottom: 125%;

  width: 200px;
  padding: 6px 12px;

  z-index: 1002;

  transform: translateX(-50%);

  background-color: #4A4A4A;
  border-radius: 4px;

  color: #FFFFFF;
  font-size: 0.82rem;
  font-weight: normal;
  line-height: 1.4;
  text-align: left;
  white-space: normal;
}

.info:hover::before,
.info:focus::before {
  content: "";

  position: absolute;
  left: 50%;
  bottom: 115%;

  z-index: 1001;

  transform: translateX(-50%);

  border-width: 5px;
  border-style: solid;
  border-color: #4A4A4A transparent transparent transparent;
}


/* =========================================================
   REQUIRED FIELD NOTE
   ========================================================= */

.required-note {
  margin: -5px 0 17px;

  color: #626262;
  font-size: 0.84rem;
  line-height: 1.4;
}

.required-note strong {
  color: #B00020;
}


/* =========================================================
   ERROR MESSAGE
   ========================================================= */

.error-message {
  display: none;

  margin-bottom: 20px;
  padding: 12px 16px;

  background-color: #FFE5E5;
  border: 1px solid #B00020;
  border-radius: 4px;

  color: #B00020;
  font-size: 1.125rem;
  font-weight: bold;
  line-height: 1.45;
}


/* =========================================================
   CALCULATE BUTTON
   ========================================================= */

.calc-btn {
  width: 100%;
  padding: 16px;

  background-color: #333333;
  border: none;
  border-radius: 6px;

  color: #FFFFFF;
  cursor: pointer;

  font-size: 20px;
  font-weight: bold;

  transition: background-color 0.3s;
}

.calc-btn:hover,
.calc-btn:focus {
  background-color: #4A4A4A;
  color: #FFFFFF;
}


/* =========================================================
   CLEAR BUTTON
   ========================================================= */

.clear-btn {
  display: none;

  width: 100%;
  margin-top: 10px;
  padding: 16px;

  background-color: #AAAAAA;
  border: none;
  border-radius: 6px;

  color: #FFFFFF;
  cursor: pointer;

  font-size: 18px;

  transition: background-color 0.3s;
}

.clear-btn:hover,
.clear-btn:focus {
  background-color: #888888;
  color: #FFFFFF;
}


/* =========================================================
   RESULT DISPLAY
   ========================================================= */

.result {
  margin-top: 25px;
  text-align: center;
}

.result:empty {
  display: none;
}

.result:not(:empty) {
  display: block;
  padding: 20px 15px;

  background-color: #FAFAFA;
  border: 2px dotted #777777;
  border-radius: 6px;
}

.result-intro {
  margin-bottom: 8px;

  color: #333333;
  font-size: 1.25rem;
  font-weight: bold;
}

.main-size {
  margin-bottom: 0.25em;

  color: #1F1F1F;
  font-size: 3em;
  font-weight: bold;
  line-height: 1.1;
}

.alpha-size {
  margin: 8px 0 12px;

  color: #333333;
  font-size: 1.35rem;
  font-weight: bold;
  line-height: 1.3;
}

.size-standards {
  margin-top: 8px;
}

.size-standards small {
  display: block;
  margin: 3px 0;

  color: #626262;
  font-size: 0.95rem;
  line-height: 1.4;
}


/* =========================================================
   ADVERTISEMENT LABEL
   ========================================================= */

.ad-label {
  display: block;
  width: 100%;
  margin: 0 0 5px;

  color: #777777;
  font-size: 0.7rem;
  line-height: 1;
  letter-spacing: 0.05em;
  text-align: center;
  text-transform: uppercase;
}


/* =========================================================
   MOBILE RESULT AD
   ========================================================= */

.mobile-result-ad {
  display: none;
}


/* =========================================================
   DESKTOP SIDEBAR AD
   ========================================================= */

.advertisement {
  width: 300px;
  min-height: 600px;
  margin: 0;
  padding: 0;

  display: flex;
  flex-direction: column;
  align-self: stretch;
  align-items: center;
  justify-content: flex-start;

  background-color: transparent;
  border: none;
  border-radius: 0;

  text-align: center;
}

.advertisement a,
.mobile-result-ad a {
  display: inline-block;
  max-width: 100%;
}

.advertisement iframe,
.mobile-result-ad iframe,
.advertisement ins,
.mobile-result-ad ins,
.advertisement img,
.mobile-result-ad img {
  display: block;
  max-width: 100%;
  margin: 0 auto;
}


/* =========================================================
   INFORMATION SECTIONS
   ========================================================= */

.measurement-guide {
  width: calc(100% - 40px);
  max-width: 800px;
  margin: 30px auto 60px;
  padding: 30px;

  background-color: #FFFFFF;
  border: 1px solid #B0B0B0;
  border-radius: 8px;
}

.measurement-guide h2 {
  margin: 0 0 20px;

  color: #1F1F1F;
  font-size: clamp(1.8rem, 5vw, 2.4rem);
  line-height: 1.25;
  text-align: center;
}

.measurement-guide h3 {
  margin: 30px 0 10px;

  color: #1F1F1F;
  font-size: 1.8em;
  line-height: 1.3;
}

.measurement-guide article:first-of-type h3 {
  margin-top: 20px;
}

.measurement-guide p {
  margin: 0 0 16px;

  color: #333333;
  font-size: 18px;
  line-height: 1.6;
}

.measurement-guide p:last-child {
  margin-bottom: 0;
}

.measurement-guide ul {
  margin: 15px 0 0;
  padding-left: 25px;
}

.measurement-guide li {
  margin-bottom: 8px;

  color: #333333;
  font-size: 17px;
  line-height: 1.55;
}


/* =========================================================
   MEASUREMENT DIAGRAM
   ========================================================= */

.diagram-placeholder {
  display: block;

  width: 100%;
  max-width: 400px;
  margin: 0 auto 30px;

  overflow: hidden;

  border: 3px dashed #B0B0B0;
  border-radius: 6px;
}

.diagram-placeholder img {
  display: block;
  width: 100%;
  height: auto;
}


/* =========================================================
   DRESS SHIRT SIZE TABLE
   ========================================================= */

.table-wrapper {
  width: 100%;
  margin: 22px 0;

  overflow-x: auto;

  border: 1px solid #D3D3D3;
  border-radius: 6px;

  -webkit-overflow-scrolling: touch;
}

.table-wrapper table {
  width: 100%;
  min-width: 620px;

  border-collapse: collapse;

  background-color: #FFFFFF;
  color: #333333;
  font-size: 0.98rem;
}

.table-wrapper caption {
  padding: 13px 15px;

  background-color: #F2F2F2;
  border-bottom: 1px solid #D3D3D3;

  color: #1F1F1F;
  font-size: 1rem;
  font-weight: bold;
  text-align: left;
}

.table-wrapper th,
.table-wrapper td {
  padding: 13px 15px;

  border-right: 1px solid #D3D3D3;
  border-bottom: 1px solid #D3D3D3;

  line-height: 1.5;
  text-align: left;
  vertical-align: top;
}

.table-wrapper th:last-child,
.table-wrapper td:last-child {
  border-right: none;
}

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

.table-wrapper th {
  background-color: #EEEEEE;
  color: #1F1F1F;
  font-weight: bold;
}

.table-wrapper tbody tr:nth-child(even) {
  background-color: #FAFAFA;
}

.table-wrapper tbody tr:hover {
  background-color: #F3F3F3;
}


/* =========================================================
   FAQ SECTION
   ========================================================= */

.faq-section details {
  margin-bottom: 12px;

  overflow: hidden;

  background-color: #FFFFFF;
  border: 1px solid #D3D3D3;
  border-radius: 6px;
}

.faq-section details:last-child {
  margin-bottom: 0;
}

.faq-section summary {
  position: relative;

  padding: 16px 48px 16px 17px;

  background-color: #F7F7F7;

  color: #1F1F1F;
  cursor: pointer;

  font-size: 1.04rem;
  font-weight: bold;
  line-height: 1.45;
  list-style: none;
}

.faq-section summary::-webkit-details-marker {
  display: none;
}

.faq-section summary::after {
  content: "+";

  position: absolute;
  top: 50%;
  right: 17px;

  transform: translateY(-50%);

  color: #1F1F1F;
  font-size: 1.45rem;
  font-weight: normal;
}

.faq-section details[open] summary::after {
  content: "−";
}

.faq-section summary:hover {
  background-color: #EEEEEE;
}

.faq-section details[open] summary {
  border-bottom: 1px solid #D3D3D3;
}

.faq-section details p {
  margin: 0;
  padding: 16px 17px 18px;

  font-size: 1rem;
  line-height: 1.65;
}


/* =========================================================
   DISCLAIMER
   ========================================================= */

.disclaimer-section {
  background-color: #FAFAFA;
  border-left: 5px solid #777777;
}

.disclaimer-section h2 {
  font-size: clamp(1.5rem, 4vw, 1.9rem);
}


/* =========================================================
   RELATED CALCULATOR TOOLS
   ========================================================= */

.other-calculators {
  width: 100%;
  max-width: 900px;
  margin: 60px auto;
  padding: 0 20px;

  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 20px;
}

.other-calculators h2 {
  width: 100%;
  margin: 0 0 20px;

  color: #1F1F1F;
  font-size: 2.2em;
  line-height: 1.25;
  text-align: center;
}

.other-calculators .calc-card {
  flex: 0 0 260px;

  height: 260px;
  padding: 35px 30px 10px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;

  background-color: #FFFFFF;
  border: 1px solid #B0B0B0;
  border-radius: 8px;

  color: #333333;
  font-size: 20px;
  text-align: center;
  text-decoration: none;
  white-space: normal;
  overflow-wrap: break-word;

  transition:
    background-color 0.3s,
    box-shadow 0.3s;
}

.other-calculators .calc-card:hover,
.other-calculators .calc-card:focus {
  background-color: #E8E8E8;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);

  color: #333333;
}

.other-calculators .calc-card img {
  display: block;

  width: 70%;
  height: 145px;
  margin: 0 auto 8px;

  object-fit: contain;
}

.calc-card-title {
  color: #333333;
  font-size: 20px;
  line-height: 1.35;
}


/* =========================================================
   FOOTER
   Exact original site styling
   ========================================================= */

footer {
  background-color: #4A4A4A;
  color: #FFFFFF;
  padding: 30px 20px;
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: space-around;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.footer-links .column {
  flex: 1;
  min-width: 150px;
  margin: 10px;
}

.footer-links h3 {
  margin-top: 0;
}

.footer-links ul {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: 5px;
}

.footer-links a {
  color: #FFFFFF;
  text-decoration: none;
}

.footer-links a:hover {
  text-decoration: underline;
}


/* =========================================================
   MOBILE MENU
   Exact original site styling
   ========================================================= */

@media (max-width: 768px) {
  .logo-desktop {
    display: none;
  }

  .logo-mobile {
    display: block;
  }

  #hamburger {
    display: flex;
  }

  header nav > ul#nav-menu {
    display: none;
  }

  #nav-menu {
    display: none;
  }

  #nav-menu.active {
    display: flex;

    position: fixed;
    top: 70px;
    right: 0;

    width: 260px;
    max-height: none !important;
    padding: 10px 0;

    z-index: 1999;

    flex-direction: column;

    overflow-y: visible !important;

    background-color: rgba(51, 51, 51, 0.95);
    border-radius: 0 0 0 8px;
    box-shadow: -2px 2px 8px rgba(0, 0, 0, 0.2);

    animation: slideIn 0.3s ease-out forwards;
  }

  @keyframes slideIn {
    from {
      transform: translateX(100%);
    }

    to {
      transform: translateX(0);
    }
  }

  #nav-menu.active li {
    width: 100%;
  }

  #nav-menu.active li a {
    display: block;
    width: 100%;
    padding: 15px 20px;

    color: #FFFFFF;
    font-weight: bold;
    letter-spacing: 0.5px;
    text-decoration: none;
    text-transform: uppercase;

    transition: background-color 0.2s;
  }

  #nav-menu.active li:not(:last-child) a {
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  }

  #nav-menu.active li a:hover,
  #nav-menu.active li a:focus {
    background-color: rgba(255, 255, 255, 0.1);
    color: #FFFFFF;
  }

  .page-intro {
    padding-top: 25px;
  }

  .page-intro h1 {
    font-size: 2.25rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .measurement-guide {
    padding: 28px 25px;
  }
}


/* =========================================================
   MOBILE AND TABLET ADVERTISEMENT LAYOUT
   ========================================================= */

@media (max-width: 901px) {
  main {
    padding-top: 12px;
    padding-bottom: 10px;

    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  .calculator {
    order: 1;
  }

  .mobile-result-ad {
    order: 2;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;

    width: 100%;
    max-width: 500px;
    height: auto;
    margin: 0 auto;
    padding: 0;

    overflow: hidden;

    background-color: transparent;
    border: none;
    border-radius: 0;

    text-align: center;
  }

  .mobile-result-ad img,
  .mobile-result-ad iframe,
  .mobile-result-ad ins {
    display: block;
    max-width: 100% !important;
    height: auto !important;
    margin: 0 auto;
  }

  .advertisement {
    display: none;
  }
}


/* =========================================================
   SMALL MOBILE SCREENS
   ========================================================= */

@media (max-width: 600px) {
  body,
  main {
    padding-right: 10px;
    padding-left: 10px;
  }

  .page-intro {
    padding: 22px 10px 14px;
  }

  .page-intro h1 {
    margin-bottom: 10px;
    font-size: 2rem;
  }

  .page-intro p {
    font-size: 0.98rem;
    line-height: 1.55;
  }

  main {
    padding-top: 12px;
    padding-bottom: 10px;
  }

  .calculator {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 20px 10px;
  }

  .section-title {
    font-size: 1.75rem;
  }

  .height-wrapper {
    gap: 12px;
  }

  .height-field label {
    min-height: 50px;
  }

  .clear-btn,
  .calc-btn {
    padding: 14px;
    font-size: 1rem;
  }

  .main-size {
    font-size: 2.5em;
  }

  .alpha-size {
    font-size: 1.2rem;
  }

  .measurement-guide {
    width: 100%;
    margin-top: 20px;
    margin-bottom: 35px;
    padding: 24px 18px;
  }

  .measurement-guide h2 {
    font-size: 1.65rem;
  }

  .measurement-guide h3 {
    margin-top: 24px;
    font-size: 1.3rem;
  }

  .measurement-guide p {
    font-size: 1rem;
  }

  .measurement-guide li {
    font-size: 0.98rem;
  }

  .table-wrapper {
    margin-right: 0;
    margin-left: 0;
  }

  .faq-section summary {
    padding: 14px 44px 14px 14px;
    font-size: 0.98rem;
  }

  .faq-section details p {
    padding: 14px;
    font-size: 0.96rem;
  }

  .other-calculators {
    gap: 10px;
    padding: 0 10px;
  }

  .other-calculators h2 {
    font-size: 1.75rem;
  }

  .other-calculators .calc-card {
    flex-basis: 100%;
    width: 100%;
    max-width: 300px;
  }
}


/* =========================================================
   VERY SMALL MOBILE SCREENS
   ========================================================= */

@media (max-width: 400px) {
  header {
    padding-right: 12px;
    padding-left: 12px;
  }

  #hamburger {
    right: 12px;
  }

  .height-wrapper {
    flex-direction: column;
    gap: 0;
  }

  .height-field label {
    min-height: 0;
  }

  .page-intro h1 {
    font-size: 1.8rem;
  }

  .calculator input[type="number"] {
    font-size: 16px;
  }
}


/* =========================================================
   PRINT STYLES
   ========================================================= */

@media print {
  body {
    background-color: #FFFFFF;
  }

  header,
  .mobile-result-ad,
  .advertisement,
  .other-calculators,
  footer,
  .calc-btn,
  .clear-btn {
    display: none !important;
  }

  .page-intro {
    margin-top: 0;
    padding-top: 0;
  }

  main {
    display: block;
    padding: 0;
  }

  .calculator,
  .measurement-guide {
    width: 100%;
    max-width: none;
    margin: 0 0 20px;
    padding: 15px;

    border: 1px solid #CCCCCC;
    box-shadow: none;
  }

  details {
    display: block;
  }

  details > * {
    display: block;
  }
}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}