/* app/static/style.css */

/* Custom font declaration */
@font-face {
  font-family: "ArchivoBlack-2";
  src: url("fonts/ArchivoBlack-2.otf") format("opentype");
}

/* 1) Global box-sizing to avoid unexpected width expansions */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Use flex layout so footer can stick at bottom */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  font-family: "Arial", sans-serif;
  background: #fff;
  color: #333;
  overflow-x: hidden;
  line-height: 1.6;
}

/* Main container for page content */
.main-content {
  flex: 1 0 auto;
}

/* Footer at bottom */
.site-footer {
  flex-shrink: 0;
  text-align: center;
  padding: 1rem 2rem;
  background: #202021;
  color: #fff;
  border-top: 1px solid #333;
  position: relative;
  overflow: hidden;
  padding-top: 30px;
  padding-bottom: 30px;
}

.site-footer p {
  margin: 0;
  font-size: 0.9rem;
  color: #fff;
}

/* Footer yellow shape */
.site-footer::before {
  z-index: -1;
  content: "";
  position: absolute;
  top: 50px;
  left: 50%;
  transform: translateX(-50%);
  width: 130%;
  height: 1400px;
  background-color: #D3FC01;
  border-top-left-radius: 50%;
  border-top-right-radius: 50%;
}

/* Links */
a {
  color: #D3FC01;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* Typography */
h1, h2 {
  margin-bottom: 1rem;
  letter-spacing: -0.03em;
  font-weight: 700;
  text-transform: uppercase;
  font-family: 'Arial Black', 'Arial Black', sans-serif;
  transform-origin: left;
  color: #333333;
  line-height: 0.9;
}

h3 {
  margin-bottom: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  font-family: 'Arial Black', 'Arial Black', sans-serif;
  letter-spacing: -0em;
  transform-origin: left;
  color: #333333;
  line-height: 0.9;
}

/* Header */
.site-header {
  background: #202021;
  margin-bottom: 2rem;
  color: white;
  padding: 30px 0;
}
.site-header .header-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
}
.company-section {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.company-logo {
  height: 40px;
}
.company-name {
  font-size: 1.4rem;
  margin: 0;
  white-space: normal;
  color: #fff;
  font-family: 'Arial Black', 'Arial Black', sans-serif;
  text-transform: uppercase;
}
.checkout-lock {
  font-weight: bold;
  color: #D3FC01;
}

/* Main checkout container */
.checkout-container {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  flex-wrap: nowrap;
  gap: 2rem;
  padding: 2rem 1rem;
  align-items: flex-start;
  min-width: 0;
}

.left-column {
  flex: 1 1 0;
  min-width: 0;
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 24px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  padding: 2rem;
}
.right-column {
  flex: 0 0 35%;
  flex-shrink: 0;
  background: #202021;
  border: 1px solid #333;
  border-radius: 24px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  padding: 2rem;
  color: #fff;
}

/* Responsive: stack columns below 800px */
@media (max-width: 800px) {
  .checkout-container {
    flex-direction: column;
  }
  .left-column,
  .right-column {
    width: 100%;
    margin-bottom: 1.5rem;
  }
}

/* Titles in both columns match in size */
.left-column-title,
.right-column-title {
  font-size: 1.4rem;
  font-weight: bold;
  margin-top: 0;
  margin-bottom: 1.5rem;
  text-align: left;
}

/* Section titles with styling from landing page */
.section-subtitle {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #444;
  font-size: 1.4rem;
  font-weight: bold;
  margin: 0rem 0 1rem;
  text-align: center;
  position: relative;
  font-family: 'Arial Black', 'Arial Black', sans-serif;
  text-transform: uppercase;
  letter-spacing: -0.03em;
}

.section-subtitle::before,
.section-subtitle::after {
  content: "";
  flex: 1;
  border-top: 1px solid #ccc;
  margin: 0 1rem;
}

/* Form fields */
.checkout-form input[type="text"],
.checkout-form input[type="email"] {
  width: 100%;
  padding: 0.8rem 1rem;
  margin-top: 0.5rem;
  margin-bottom: 0.8rem;
  border: 1px solid #ddd;
  border-radius: 12px;
  font-size: 1rem;
  transition: border-color 0.3s ease;
}

.checkout-form input[type="text"]:focus,
.checkout-form input[type="email"]:focus {
  border-color: #D3FC01;
  outline: none;
  box-shadow: 0 0 0 2px rgba(211, 252, 1, 0.2);
}

/* Name + Surname side-by-side */
.inline-fields {
  display: flex;
  gap: 1rem;
}
.inline-fields > div {
  flex: 1;
}

/* Company data box */
.company-box {
  border: 1px solid #ddd;
  padding: 1.5rem;
  margin-top: 2rem;
  background: #f9f9f9;
  border-radius: 16px;
}
.company-box h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.2rem;
}

/* NIP row: label & button in same line */
.nip-row {
  display: flex;
  gap: 1rem;
  align-items: center;
}

/* City + Postal side-by-side */
.city-postal {
  display: flex;
  gap: 1rem;
}

/* Submit button style matching landing page */
.submit-button {
  width: 100%;
  padding: 1rem;
  background: #D3FC01;
  color: #000;
  font-size: 1.5rem;
  font-weight: 600;
  border: none;
  border-radius: 25px;
  cursor: pointer;
  transition: all 0.3s ease;
}
.submit-button:hover {
  background: #b8e600;
  transform: translateY(-2px);
}

/* Smaller button w/ same style, auto width */
.small-button {
  display: inline-block;
  background: #D3FC01;
  color: #000;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 25px;
  padding: 0.6rem 1rem;
  cursor: pointer;
  width: auto;
  transition: all 0.3s ease;
}
.small-button:hover {
  background: #b8e600;
  transform: translateY(-2px);
}

/* Payment disclaimers & checkboxes */
.disclaimer-section {
  margin-top: 2rem;
}
.disclaimer-section label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
  font-size: 0.95rem;
}

/* Payment operator box on left column */
.payment-operator-box {
  margin-top: 2rem;
  border: 1px solid #ddd;
  padding: 1.5rem;
  border-radius: 16px;
  background: #f9f9f9;
  text-align: center;
}

.payment-operator-box h4 {
  margin-top: 0;
  font-size: 1.1rem;
  font-weight: bold;
}

/* Exactly 2 rows, 5 columns => 10 "slots" for your 10 logos. */
.payment-operator-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: repeat(2, auto);
  gap: 0.8rem;
  margin-top: 1rem;
  align-items: center;
  justify-items: center;
}

.payment-operator-grid img {
  width: auto;
  height: 28px;
  max-width: 100%;
  object-fit: contain;
}

/* Right column summary */
.summary-box h2 {
  margin-top: 0;
  color: #fff;
}
.product-preview img {
  max-width: 100%;
  display: block;
  margin-bottom: 1rem;
  border-radius: 12px;
}
.product-preview h3 {
  color: #D3FC01;
}
.old-price {
  font-size: 1.3rem;
  font-weight: bold;
  margin: 0.5rem 0;
  color: #a0a0a0;
  text-decoration: line-through;
}
.new-price {
  font-size: 1.3rem;
  font-weight: bold;
  margin: 0.5rem 0;
  color: #fff;
}
.description {
  margin-top: 1rem;
  line-height: 1.4;
}

/* Security box */
.security-box {
  margin-top: 1.5rem;
  padding: 1.5rem;
  border: 1px solid #444;
  background: #262626;
  border-radius: 16px;
}
.lock-info,
.contact-info {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  color: #D3FC01;
}
.lock-info a,
.contact-info a {
  color: #D3FC01;
}
.lock-info img {
  width: 20px;
  height: auto;
}

/* Media query for narrower screens */
@media (max-width: 600px) {
  .inline-fields,
  .nip-row,
  .city-postal {
    flex-direction: column;
    align-items: stretch;
  }
  
  .payment-operator-grid img {
    height: 24px;
  }
}

/* Required field indicators with larger asterisk */
input:required, select:required {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Ctext x='0' y='12' fill='%23e74c3c' font-size='16'%3E*%3C/text%3E%3C/svg%3E");
  background-position: right 10px top 50%;
  background-repeat: no-repeat;
  background-size: 13px;
  padding-right: 30px;
}

/* Required checkbox indicator */
.disclaimer-section label:has(input[type="checkbox"][required])::after {
  content: " *";
  color: #e74c3c;
  font-size: 1.2rem;
  font-weight: bold;
  margin-left: 0.2rem;
}

.order-summary-line {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 1.3rem;
  font-weight: bold;
  margin-top: 1.5rem;
  margin-bottom: 0.8rem;
}

/* Styling for purchase type radio buttons */
.purchase-type-group {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #f9f9f9;
    border-radius: 12px;
    border: 1px solid #eee;
}

.purchase-type-group .group-title {
    font-size: 1.1rem;
    font-weight: bold;
    margin-top: 0;
    margin-bottom: 1rem;
    color: #333;
    font-family: Arial, sans-serif;
    text-transform: none;
    line-height: 1.2;
    letter-spacing: 0;
    text-align: left;
}

.radio-buttons {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 0.5rem;
}

.radio-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 1rem;
}

.radio-label input[type="radio"] {
    display: none; /* Hide original radio */
}

.radio-custom {
    height: 20px;
    width: 20px;
    border: 2px solid #ccc;
    border-radius: 50%;
    margin-right: 0.5rem;
    display: inline-block;
    position: relative;
    transition: border-color 0.2s ease;
}

.radio-label input[type="radio"]:checked + .radio-custom {
    border-color: #D3FC01;
}

.radio-label input[type="radio"]:checked + .radio-custom::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #D3FC01;
}

.gift-info {
    font-size: 0.9rem;
    color: #555;
    margin-top: 0.8rem;
    padding: 0.5rem;
    background: #eef8c6;
    border-radius: 8px;
    display: none; /* Hidden by default */
}

/* Make read-only company fields appear "grayed out" */
.company-box input[readonly] {
  background-color: #eee;
  cursor: not-allowed;
}

/* Simple message area within the company box for success/error info */
#companyMessages {
  margin-top: 1rem;
  font-weight: bold;
  color: #555;
}

/* Hide company fields by default */
.company-hidden-fields {
  display: none; /* Hide by default */
}

.company-hidden-fields.visible {
  display: block;
}
