/* Combined Stylesheet: splash_style.css + style.css */

/* Global Resets & Base Styles
-------------------------------------------------- */
body, html {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  height: 100%;
}

*, *::before, *::after {
  box-sizing: inherit;
}

body { /* From splash_style.css - Main page body */
  font-family: 'Arial Rounded MT Bold', "Plus Jakarta Sans", "Noto Sans", sans-serif;
  background-color: #f8fafc;
  color: #0d151c;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Page Wrapper & Layout (from splash_style.css)
-------------------------------------------------- */
.page-wrapper {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  width: 100%;
  height: 100%;
  padding-top: 96px; /* Add top padding to offset fixed header (adjust if header height changes) */
}

.layout-container {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  height: 100%;
}

/* Main Content Area (from splash_style.css) */
.main-content-area {
  padding-left: 5rem; /* Reduced desktop padding */
  padding-right: 5rem; /* Reduced desktop padding */
  display: flex;
  flex-grow: 1;
  justify-content: center;
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
}

.content-wrapper { /* From splash_style.css */
  display: flex;
  flex-direction: column;
  max-width: 1280px; /* Increased max-width for desktop */
  flex-grow: 1;
}

/* Container Query Setup (from splash_style.css) */
.cq-container {
  container-type: inline-size;
}

/* Typography
-------------------------------------------------- */
/* Headings from style.css (Builder specific) */
h1, h2, h3 { /* From style.css */
    color: #0d151c; /* Updated to match main site text color */
    font-family: "Noto Sans", sans-serif; /* Consider harmonizing with page body font if needed */
}

h1 { /* From style.css */
    text-align: center;
    margin-bottom: 20px;
}

h2 { /* From style.css */
    margin-top: 20px;
    margin-bottom: 10px;
}

/* Section Titles & Subtitles (from splash_style.css) */
.section-title {
  color: #0d151c;
  letter-spacing: -0.025em;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.1;
  max-width: 720px;
  margin: 0;
}

textarea{
  border: 1px solid #ced4da;
}

/* Ensure builder section titles match the bolder style of splash page titles */
#configuratorSection .section-content > h1.section-title,
#reviewSection .section-content > h1.section-title,
#paymentSection .section-content > h1.section-title { /* Added payment section for consistency */
    font-weight: 900;
    font-size: 2.25rem; /* Matches the @container rule */
    margin-bottom: 40px; /* Added space below the title */
}

.section-subtitle {
  color: #0d151c;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5rem;
  max-width: 720px;
  margin: 0;
}

/* Hero Text (from splash_style.css) */
.hero-title {
  color: white;
  font-size: 2.25rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.033em;
  margin: 0;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.4);
}

.hero-subtitle {
  color: white;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.25rem;
  margin: 0;
  text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.4);
}

/* Copyright Text (from splash_style.css) */
.copyright-text {
  color: #49749c;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5rem;
  margin: 0;
}

/* Upload Text (from style.css) */
.upload-text {
    font-size: 0.8em;
    margin-top: 5px;
    text-align: center;
    color: #49749c; /* Added to match feature-item-description color */
    pointer-events: none;
}

/* Navigation (from splash_style.css)
-------------------------------------------------- */
.main-navigation {
  display: flex;
  align-items: center;
  gap: 2.25rem;
}

.main-navigation a {
  color: #0d151c;
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.25rem;
  text-decoration: none;
}

.main-navigation a:hover {
  text-decoration: underline;
}

.footer-navigation {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
}

.footer-navigation a {
  color: #49749c;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.5rem;
  min-width: 10rem;
  text-decoration: none;
}

.footer-navigation a:hover {
  text-decoration: underline;
}

/* Buttons
-------------------------------------------------- */
/* General Button from splash_style.css */
.button {
  display: flex;
  min-width: 84px;
  max-width: 480px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 9999px;
  height: 2.5rem;
  padding-left: 1rem;
  padding-right: 1rem;
  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.25rem;
  letter-spacing: 0.015em;
  border: none;
  text-decoration: none;
  transition: background-color 0.2s ease-in-out;
}

.button-primary {
  background-color: #2988BC;
  color: #f8fafc;
  /* Inherits other .button styles like padding, height, font, etc. */
}

.button-primary:hover {
  background-color: #2F496E;
}

/* Ensure text within <a> buttons is centered if not already by .button */
.button {
  text-align: center;
}
.button .button-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* General Button from style.css (Builder specific) */
button { /* From style.css */
    display: flex; /* Added from .button */
    align-items: center; /* Added from .button */
    justify-content: center; /* Added from .button */
    background-color: #2988BC; /* Changed to match .button-primary */
    color: #f8fafc; /* Changed to match .button-primary */
    padding: 0 1rem; /* Adjusted to match .button padding with height */
    border: none;
    border-radius: 9999px; /* Changed to match .button (pill shape) */
    cursor: pointer;
    /* margin-right: 10px; /* Removed global margin */
    transition: background-color 0.2s ease-in-out; /* Aligned with .button */
    height: 2.5rem; /* Added from .button */
    font-size: 0.875rem; /* Added from .button */
    font-weight: 700; /* Added from .button */
    line-height: 1.25rem; /* Added from .button */
    letter-spacing: 0.015em; /* Added from .button */
}

button:hover { /* From style.css */
    background-color: #2F496E; /* Changed to match .button-primary:hover */
}

.button-secondary { /* From style.css */
    display: inline-flex; /* Changed from flex to inline-flex */
    align-items: center;
    justify-content: center;
    background-color: #6c757d;
    color: white;
    padding: 0 1rem;
    border: none;
    border-radius: 9999px;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
    height: 2.5rem;
    font-size: 0.875rem;
    font-weight: 700;
    line-height: 1.25rem;
    letter-spacing: 0.015em;
    width: auto; /* Ensure width shrinks to fit content */
    min-width: 0; /* Remove any minimum width */
    max-width: 100%; /* Prevent overflow */
}
.button-secondary:hover {
    background-color: #5a6268;
}

.button-group-horizontal {
  display: flex;
  flex-direction: row !important;
  gap: 10px;
  justify-content: center;
  align-items: center;
}

.site-footer-container {
  display: flex;
  justify-content: center;
}

.site-footer-content {
  max-width: 960px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 2.5rem 1.25rem;
  text-align: center;
}

/* Main Page Sections (Hero, Features, CTA - from splash_style.css)
-------------------------------------------------- */
.hero-section {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-section-padding-wrapper {
  width: 100%;
  max-width: 960px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

.hero-section-content {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  width: 100%;
  box-sizing: border-box;
}

.hero-text-content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-align: center;
}

.content-section {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  padding: 2.5rem 1rem;
}

/* New Layout for Subtitle and Single Image
-------------------------------------------------- */
.subtitle-image-layout {
  display: flex;
  flex-direction: column; /* Mobile default: text above image */
  gap: 1.5rem; /* Space between text and image on mobile */
  align-items: center; /* Center items if they don't take full width */
  width: 100%; /* Take full width of its container (.content-section) */
}

.text-content-column {
  display: flex;
  flex-direction: column;
  gap: 0.75rem; /* Space between title and subtitle */
  align-items: center; /* Center text content on mobile */
  text-align: center; /* Center text within the column on mobile */
  width: 100%;
}

/* Ensure section-title within this layout also centers on mobile if it has a conflicting text-align */
/* Applies to both subtitle-image-layout and image-text-layout for mobile */
.subtitle-image-layout .section-title,
.image-text-layout .section-title {
  text-align: center; 
} 

.single-feature-image {
  width: 100%; /* Take full width available */
  max-width: 500px; /* Max width for the image on mobile for better scaling */
  border-radius: 0.75rem; /* Consistent with previous feature images */
  overflow: hidden; /* Ensures the img tag respects the border-radius */
}

.marketing-img {
  display: block; /* Removes extra space below inline images */
  width: 100%;    /* Makes image responsive to parent container's width */
  height: auto;   /* Maintains original aspect ratio */
  border-radius: inherit; /* Ensures image corners match parent's rounded corners */
}

/* Desktop styles for subtitle-image-layout */
@media (min-width: 768px) {
  .subtitle-image-layout {
    flex-direction: row; /* Desktop: text left, image right */
    align-items: center; /* Vertically center items */
    justify-content: space-between; /* Distribute space */
    gap: 2rem; /* Space between text and image on desktop */
  }
  .text-content-column {
    flex-basis: 45%; /* Subtitle takes up about 45% of the width */
    align-items: flex-start; /* Align text to the start (left) on desktop */
    text-align: left; /* Align text to the left within the column on desktop */
  }
  .subtitle-image-layout .section-title,
  .subtitle-image-layout .section-subtitle {
    text-align: left; /* Align subtitle text to the left on desktop */
  }
  .single-feature-image {
    flex-basis: 50%; /* Image takes up about 50% of the width */
    max-width: none; /* Remove mobile max-width constraint */
  }
}

/* Layout for Image Left, Text Right (process-features section)
-------------------------------------------------- */
.image-text-layout {
  display: flex;
  flex-direction: column; /* Mobile default: image above text */
  gap: 1.5rem; /* Space between image and text on mobile */
  align-items: center; /* Center items if they don't take full width */
  width: 100%;
}

/* Mobile ordering for .image-text-layout: Text above Image */
.image-text-layout .text-content-column {
  order: 1; /* Text content will appear first in column flow */
}

.image-text-layout .single-feature-image {
  order: 2; /* Image will appear second in column flow */
}

/*
  Reusing .text-content-column and .single-feature-image styles from above.
  Their behavior within .image-text-layout is defined by .image-text-layout's flex properties and the order set here.
*

/* Desktop styles for image-text-layout */
@media (min-width: 768px) {
  .image-text-layout {
    flex-direction: row; /* Desktop: image left, text right */
    align-items: center; /* Vertically center items */
    justify-content: space-between;
    gap: 2rem;
  }
  /* Image on the left */
  .image-text-layout .single-feature-image {
    flex-basis: 50%; /* Image takes up about 50% */
    max-width: none; /* Remove mobile max-width constraint */
     order: 1; /* Default, not strictly necessary if HTML order is image then text */
  }
  /* Text content on the right */
  .image-text-layout .text-content-column {
    flex-basis: 45%; /* Text column takes up about 45% */
    align-items: flex-start; /* Align text to the start (left) on desktop */
    text-align: left; /* Align text to the left within the column on desktop */
    order: 2; /* Default, not strictly necessary if HTML order is image then text */
  }
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(158px, 1fr));
  gap: 0.75rem;
}

.feature-item {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding-bottom: 0.75rem;
}

.feature-image {
  width: 100%;
  background-position: center;
  background-repeat: no-repeat;
  aspect-ratio: 16 / 9;
  background-size: cover;
  border-radius: 0.75rem;
}

.cta-section-inner {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 1.5rem;
  padding: 2.5rem 1rem;
}

.cta-text-content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  text-align: center;
}

.cta-button-container {
  display: flex;
  flex-grow: 1;
  justify-content: center;
}

.cta-button-wrapper {
   display: flex;
   justify-content: center;
}

.cta-button {
  flex-grow: 1;
}

/* Postcard Builder Specific Styles (from style.css)
-------------------------------------------------- */
.container { /* Builder main container from style.css */
    /* Mobile-first: Full width, no shadow/radius */
    width: 100%;
    margin: 0;
    padding: 10px; /* Padding for content within full-width container */
    background-color: #fff;
    box-shadow: none;
    border-radius: 0;
    box-sizing: border-box;
}

/* Desktop styles for .container */
@media (min-width: 768px) {
    .container {
        width: 90%;
        max-width: 1200px;
        margin: 20px auto;
        padding: 20px;
        border-radius: 20px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }
}

/* Workflow Section Styles */
details { /* From style.css */
    width: 100%;
    border: none;
    border-radius: 8px;
    overflow: visible; /* Allow dropdowns to be visible */
}


summary { /* From style.css */
    padding: 10px;
    background-color: #ffffff;
    cursor: pointer;
    font-weight: bold;
    outline: none;
    display: none; /* Summary is hidden as per previous request */
}

.section-content { /* From style.css - for builder sections */
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Postcard Preview Styles */
/* .preview { From style.css - This class is no longer used for the main postcard editor layout
    margin-bottom: 20px;
    width: 100%;
    display: flex;
    justify-content: center;
} */

/* Old .postcard-container styles are being replaced by .postcard-layout-container and .postcard-panel */
.postcard-container { /* From style.css */
    display: flex;
    /* Mobile-first: Stack postcards vertically */
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 100%; /* Takes full width of its parent (.preview) */
}
/* New styles for postcard editor layout */
.postcard-layout-container {
    display: flex;
    flex-direction: column; /* Mobile-first: Stack panels vertically */
    align-items: center; /* Center panels if they don't take full width */
    gap: 20px; /* Space between front panel and back panel */
    width: 100%;
    margin-bottom: 20px; /* Spacing before next elements like sending country */
}

.postcard-panel {
    display: flex;
    flex-direction: column;
    align-items: center; /* Center the postcard-side and its controls */
    width: 100%; /* Panel takes full width of its column in postcard-layout-container */
}

.postcard-controls {
    width: 100%;
    max-width: 500px; /* Match postcard-side max-width for alignment */
    box-sizing: border-box;
    margin-top: 20px;
    display: flex;
    flex-direction: column; /* Stack controls vertically by default */
    align-items: center; /* Center controls horizontally */
    gap: 10px; /* Gap between control elements (e.g., button and a button group) */
}

/* Ensure nested horizontal button group within controls displays correctly */
.postcard-controls .button-group-horizontal {
    /* display: flex; is already part of .button-group-horizontal */
    /* gap: 10px; is already part of .button-group-horizontal */
    justify-content: center; /* Center buttons within the horizontal group if needed */
}

.postcard-side { /* From style.css */
    border: 1px solid darkgrey;
    background-color: #fff;
    border-radius: 3px;
    box-sizing: border-box;
    width: 100%; /* Full width of its column in .postcard-container */
    max-width: 500px; /* Max width on mobile, leaving some space from screen edges */
    aspect-ratio: 7.25 / 5.25;
    height: auto; /* Let aspect-ratio determine height */
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    flex-shrink: 1; /* Prevent shrinking if flex space is limited */
    overflow: hidden; /* Important for containing images/content within postcard bounds */
    min-width: 0;
    position: relative; /* For absolute positioning of children if any */
    box-shadow: 8px 8px 10px rgba(0, 0, 0, 0.4);

}
/* Styles for portrait orientation */
.postcard-side.portrait-orientation {
    aspect-ratio: 5.25 / 7.25;
    /* Landscape max-width is 500px, its height is 500px * (5.25 / 7.25) = ~362.07px.
       For portrait (aspect-ratio 5.25 / 7.25, meaning width/height), to keep the same height as landscape,
       its width must be height * (5.25 / 7.25) = (500px * 5.25 / 7.25) * (5.25 / 7.25) = ~262.19px.
       This makes the portrait preview narrower but maintains the same height as the landscape preview. */
    max-width: calc(500px * (5.25 / 7.25) * (5.25 / 7.25)); /* Approx 262.19px */
}


#postcard-front { /* From style.css */
    min-width: 0;
    position: relative;
}

/* Desktop layout for postcard editor previews */
@media (min-width: 992px) {
    /* Old .postcard-container desktop styles */
    /* .postcard-container {
        flex-direction: row; /* Display postcard front and back side-by-side */
    /*    justify-content: center; */
    /*    align-items: flex-start; */
    /* } */
    /* .postcard-container .postcard-side {
        width: auto; /* Override mobile's 100% width */
    /*    flex-grow: 1; */
    /*    flex-basis: 0; */
    /* } */

    .postcard-layout-container {
        flex-direction: row; /* Desktop: Display panels side-by-side */
        justify-content: center; /* Center the pair of panels */
        align-items: flex-start; /* Align panels to the top */
    }

    .postcard-panel {
        flex-grow: 1;
        flex-basis: 0;
        /* max-width: 500px; is inherited and applies per side */
    }

    /* Desktop: Arrange front panel controls (Change Image, Rotates) in a row */
    .postcard-front-panel .postcard-controls {
        flex-direction: row;
        justify-content: center; /* Center the group of buttons */
    }
  .postcard-controls {
    flex-direction: row !important;
    justify-content: center;
    align-items: center;
    gap: 15px;
  }
}

.postmark-editor-container {
  position: absolute;
  top: 2%;
  left: 2%;
  right: 2%;
  width: auto;
}

.postmark-options {
  position: relative; /* Establishes positioning context for the SVG template */
  display: flex;
  gap: 10px;
}

.postmark-template-img {
  position: absolute;
  top: -20%; /* Nudge up to center vertically on the inputs */
  left: 0;
  width: 100%;
  height: 140%; /* Make it slightly larger than the input area */
  object-fit: contain;
  opacity: 0.2; /* Make it a subtle watermark */
  pointer-events: none; /* Allow clicks to pass through to the inputs */
  transform: rotate(-9deg); /* Match the review postmark style */
  transform: scale(0.75) rotate(-9deg);
  transform-origin: top left;
  z-index: 0;
}

.postmark-options input {
  background-color: transparent;
  border: none;
  border-bottom: 1px dashed #999;
  border-radius: 0;
  padding: 1.5px 2px;
  font-size: 0.9em;
  flex: 1;
  min-width: 0;
  position: relative; /* Required for z-index to take effect */
  z-index: 1; /* Ensure inputs are layered on top of the template image */
}

.postmark-options input::placeholder {
  color: #6c757d; /* A muted gray, similar to button-secondary */
}

.postcard-option {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.postcard-option label {
  cursor: pointer;
  user-select: none; /* Prevent text selection on label click */
}

/* Style for applying the white border via padding */
.postcard-side.with-border {
    /* The final border is 0.325" on a 7.25" wide postcard. (0.325 / 7.25) = ~4.5% */
    /* Using a percentage makes the preview border scale correctly with the postcard size. */
    padding: 4.5%;
    background-color: white;
}

#postcard-front-img-review{
    display: block;
    /* Make the img element fill its container (.postcard-side) completely. */
    width: 100%;
    height: 100%;
    /* Scale the image content to fit within the img element's box without cropping. */
    object-fit: contain;
}

.postcard-back-area {  /* From style.css */
    background-image: url('images/Backing_Image_5x7_10_23.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    flex-direction: row;
    height: 100%;
    width: 100%;
}

.postcard-back-left-area{ /* From style.css */
    height: 100%;
    width: 43.25%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    position: relative;
    padding: 4% 2% 12% 3%; 
    box-sizing: border-box;
}

#postcard-back-message-input, #postcard-back-message-review{
    width: 100%;
    height: 82.5%; /* Percentage of #message-area's height */
    resize: none;
    overflow: hidden; /* Hide scrollbar; content fitting is handled by JS. */
    box-sizing: border-box;
    font-family: "Noto Sans", sans-serif; /* Consistent font with other text areas */
    padding: 2%; /* Relative padding */
    border-radius: 3px;
    font-size: 100%; /* Initial font size for textarea relative to its container */
    margin: 0;
    white-space: pre-wrap; /* Ensure text wraps within the textarea */
    overflow-wrap: break-word;
}

.postcard-back-right-area { /* From style.css */
    display: flex;
    flex-direction: column;
    width: 56.75%;
    height: 100%;
    padding: 18% 2% 7.4% 2%; /* Reduced top padding to make space for address inputs below the absolute postmark inputs */
    align-items: center; /* This will now center the items horizontally */
    box-sizing: border-box;
    position: relative; /* Establish positioning context for postage area */
}

.back-right-area-input {
  justify-content: flex-end; /* Push content (postmark/address inputs) to the bottom of the padded area */
}

/* Align the address block to the bottom in the review section */
#postcard-back-review .postcard-back-right-area {
  justify-content: flex-end;
}

.address-label {
  width: 100%;
  margin-bottom: 2px;
  font-size: 0.85em;
  color: #6c757d;
  text-align: left;
  font-weight: 600;
  padding-left: 2px; /* Align with input text which has some padding/border */
}

.address-inputs { /* From style.css */
    display: flex;
    flex-direction: column;
    width: 100%; /* Relative to #address-area's width */
    box-sizing: border-box;
}

.address-name-container {
  display: flex;
}

.address-inputs input { /* From style.css */
    /* Mobile-first: Full width of .address-inputs, relative padding */
    width: 100%;
    padding: 1.5%; /* Relative padding */
    border: 1px solid #ced4da; /* Softened border color */
    border-radius: 3px;
    box-sizing: border-box;
}

/* Ensure Awesomplete wrapper takes full width within address inputs */
.address-inputs div.awesomplete {
    width: 100%;
    display: block; /* Ensures it behaves as a block-level element for width calculation */
}

/* Image Upload Styles */
.image-upload-container { /* From style.css */
    width: 100%;
    height: 100%;
    border: none;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    position: absolute;
    overflow: hidden;
    border-radius: 3px;
}

.upload-icon { /* From style.css */
    width: 50px;
    height: 50px;
    pointer-events: none;
    display: block;
}

/* Cropper.js Custom Styles */
.cropper-view-box { /* From style.css */
  outline: 2px solid #39f;
  outline-color: rgba(51, 153, 255, 0.75);
  box-shadow: 0 0 0 1px #fff, 0 0 5px 2px rgba(0, 0, 0, 0.3);
}

.cropper-dashed { /* From style.css */
  border-color: rgba(0, 0, 0, 0.6);
}

.cropper-modal { /* From style.css */
  background-color: #000;
  opacity: 0.65;
}

.cropper-point { /* From style.css */
  background-color: rgb(0, 0, 0);
  opacity: 0.9;
  width: 10px;
  height: 10px;
}
.cropper-line { /* From style.css */
  background-color: rgb(0, 0, 0);
  opacity: 0.9;
}

/* Signature Pad Styles */
.signature-pad-wrapper { /* From style.css */
    border: 1px solid #ccc;
    border-radius: 3px;
    padding: 20px;
    margin-top: 20px;
    margin-bottom: 20px;
    background-color: #f9f9f9;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 450px;
    box-sizing: border-box;
}

.signature-pad-wrapper.hidden { /* From style.css */
    display: none !important;
}

.signature-pad-wrapper h3 { /* From style.css */
    margin-top: 0;
    margin-bottom: 15px;
    color: #333; /* Already defined in global h3, but kept for specificity if needed */
}

.canvas-container { /* From style.css */
    width: 100%;
    max-width: 400px;
    height: 150px; /* Example: Reduced height */
    border: 1px dashed #aaa;
    margin-bottom: 15px;
    background-color: #fff;
    border-radius: 3px;
}

#signatureCanvas { /* From style.css */
    width: 100%;
    height: 100%;
    cursor: crosshair;
}

.postcard-signature { /* From style.css */
    max-width: 80%;
    height: 17.5%;
    display: block; /* Keep as block for margin auto to work */
    margin-left: auto;  /* Pushes the element to the right */
    margin-right: 10px;    /* No margin on the right */
}

#signaturePreview.hidden { /* From style.css */
    display: none !important;
}

/* Payment Section Layout */
.payment-layout {
    display: flex;
    flex-direction: column; /* Default to column on small screens */
    gap: 40px; /* Space between summary and form */
    width: 100%;
    max-width: 800px; /* Limit max width of the payment layout */
    margin: 0 auto; /* Center the layout */
}

/* Style for the "What is this for?" link */
.sending-country-info-link {
    color: #2988BC; /* Match button/link color */
    text-decoration: underline;
    font-style: italic;
    cursor: pointer;
    font-size: 0.9em; /* Slightly smaller than label text */
    margin-left: 0.5rem; /* Space from the input */
    white-space: nowrap; /* Prevent wrapping */
}

.payment-summary,
.payment-form-container {
    flex: 1; /* Allow both sections to grow */
    min-width: 280px; /* Minimum width before wrapping */
    /* max-width: 700px; is on the parent .payment-layout */
    max-width: 700px;
    width: 100%;
}

#payment-element {
  max-width: 600px; /* or any value up to Stripe's max */
  width: 100%;
  margin: 0 auto;   /* center if desired */
}

/* Horizontal layout on larger screens */
@media (min-width: 768px) { /* Adjust breakpoint as needed */
    .payment-layout {
        flex-direction: row; /* Lays out children in a row */
    }
    .payment-summary {
        border-right: 1px solid #e0e0e0; /* Thin vertical line */
        padding-right: 40px; /* Space between summary content and the line */
    }
    /* .payment-form-container { */
        /* padding-left: 40px; Space between the line and form content */
    /* } */
}

/* Style for the email input in the payment form */
#payment-form input[type="text"] {
    width: 100%; /* Make email input take full width of its container */
    padding: 12px; /* Increase padding for better touch targets */
    margin-bottom: 15px; /* Add space below the input */
    border: 1px solid #ced4da; /* Match address input border */
    border-radius: 3px; /* Match address input border-radius */
    box-sizing: border-box; /* Include padding and border in element's total width and height */
}

/* Style for the submit button in the payment form */
#payment-form #submit {
    margin-top: 20px; /* Add space above the button */
    margin-left: auto; /* Center the button */
    margin-right: auto; /* Center the button */
}
/* Message Container Styles (from style.css)
-------------------------------------------------- */
.message-container {
    display: none;
    margin-top: 20px;
    padding: 15px;
    border-radius: 3px;
    text-align: center;
    width: 100%;
}

.message-container.success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message-container.error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

#feedback_input{
  width: 70%;
}

/* Utility Classes
-------------------------------------------------- */
.hidden { /* From style.css */
    display: none !important; /* Added !important to match signaturePreview.hidden */
}

/* Container Query Styles (from splash_style.css)
-------------------------------------------------- */
@container (min-width: 480px) {
  .hero-section-padding-wrapper {
    padding: 1rem;
  }
  .hero-section-content {
    gap: 2rem;
    border-radius: 0.75rem;
  }
  .hero-title {
    font-size: 3rem;
  }
  .hero-subtitle {
    font-size: 1rem;
  }
  .button.hero-button,
  .button.cta-button {
    height: 3rem;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
    font-size: 1rem;
    box-shadow: 2px 2px 8px rgba(0, 0, 0, 0.4);
  }

  .section-title {
    font-size: 2.25rem;
    font-weight: 900;
    letter-spacing: -0.033em;
  }

  .footer-navigation {
    flex-direction: row;
    justify-content: space-around;
  }
}

/* Set Noto Sans for all non-header text */
body, 
button, 
input, 
textarea, 
select, 
label, 
.section-subtitle, 
.feature-item-description, 
.copyright-text, 
.upload-text, 
.main-navigation a, 
.footer-navigation a, 
.button, 
.button-primary, 
.button-secondary, 
.message-container, 
.preferences, 
.address-inputs input, 
.signature-pad-wrapper, 
.canvas-container {
    font-family: "Noto Sans", sans-serif ;
}

/* Keep headers as-is (they already use Noto Sans in your CSS) */

/* Terms Modal Styles */
#terms-modal.hidden {
  display: none !important;
}
#terms-modal {
  position: fixed;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.45);
  z-index: 3000; /* Increased z-index */
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Sending Country Info Modal Styles */
#sending-country-info-modal.hidden {
  display: none !important;
}

#sending-country-info-modal {
  position: fixed;
  left: 0;
  top: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.45);
  z-index: 3000; /* Increased z-index */
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Common style for the inner content box of modals */
.modal-content-box {
  background: #fff;
  border-radius: 10px;
  max-width: 500px;
  width: 90%;
  padding: 2rem;
  box-shadow: 0 4px 24px rgba(0,0,0,0.15);
  position: relative;
}

/* div.awesomplete > ul {*/
  /* z-index: 2500; Ensures it's above most other elements, including your modal */
/*} */

/* Site Header (Base Styles)
-------------------------------------------------- */
.site-header {
  position: fixed; /* Make header fixed at the top */
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000; /* Ensure it's above other content */
  background-color: #f8fafc; /* Header background */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); /* Optional: add a subtle shadow */
  display: flex;
  align-items: center;
  justify-content: space-between; /* Space out logo and actions */
  padding: 0.5rem 5rem; /* Desktop padding, L/R matches .main-content-area */
  height: 96px; /* Explicit height to match .page-wrapper padding-top */
  box-sizing: border-box;
}

.logo-area {
  height: 80px; /* Consistent with mobile styles */
  width: 400px; /* Consistent with mobile styles, adjust as needed */
  background-size: contain; /* Or 'cover', ensures logo fits */
  background-repeat: no-repeat;
  background-position: center left; /* Aligns logo to the left within its area */
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1.5rem; /* Space between nav (if present) and button */
  z-index: 2500; /* Ensures it's above most other elements, including your modal */
}

/* Mobile Header Adjustments
-------------------------------------------------- */
@media (max-width: 767px) {
    .site-header {
        justify-content: center; /* Center the logo when actions are hidden */
        padding-left: 1rem; /* Adjust L/R padding for smaller screens */
        padding-right: 1rem;
    }

    .site-header .logo-area {
        /* Maintain desktop size as requested */
        width: 400px; 
        height: 80px; 
        background-position: center; /* Ensure the logo image is centered within the area */
    }

    .site-header .header-actions {
        display: none; /* Hide the entire actions container (nav + "Get Started" button) */
    }

    .button, button {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    font-size: 0.95rem;
    }

    /* If the page-wrapper's top padding needs to adjust due to header height change: */
    /* .page-wrapper { padding-top: 60px; /* Example: 36px logo height + 2 * 12px padding */ 
}

/* Tablet Main Content Area Adjustments
-------------------------------------------------- */
@media (max-width: 1199px) { /* Covers most tablets, including iPad Air in portrait and landscape */
    .main-content-area {
        padding-left: 3rem; /* Moderate padding for tablets */
        padding-right: 3rem;
    }
}

/* Mobile Main Content Area Adjustments
-------------------------------------------------- */
@media (max-width: 767px) {
  .main-content-area {
        padding-left: 1rem; /* Reduced padding for mobile */
        padding-right: 1rem; /* Reduced padding for mobile */
    }
    .content-wrapper {
        max-width: none; /* Allow content wrapper to fill available space */
    }
    .content-section {
        padding-left: 0; /* Remove horizontal padding from sections */
        padding-right: 0; /* Remove horizontal padding from sections */
        /* Vertical padding (2.5rem top/bottom) remains from original rule */
    }
}

/* Add this rule to center the Return to Preview button */
#returnToPreviewButton {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.fade-section {
  opacity: 1;
  visibility: visible;
  transition: opacity 1s ease, visibility 1s ease;
}

.fade-section.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.fade-section.fade-in {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.address-city-state-zip {
  display: flex;
}

.address-city-state-zip input {
  min-width: 0; /* Allows inputs to shrink properly */
}

/* Optional: Adjust relative widths for better proportions */
.address-city-state-zip #addressCity {
  flex: 3; /* Give more space to the city field */
}

.address-city-state-zip #addressState {
  flex: 2; /* A bit less for the state/province */
}

.address-city-state-zip #addressZip {
  flex: 2; /* And for the zip/postal code */
}

/* On mobile screens, stack the city input above state and zip */
@media (max-width: 767px) {
  .address-city-state-zip {
    flex-wrap: wrap;
  }

  .address-city-state-zip #addressCity {
    flex-basis: 100%;
  }
}

/* Styles for the address review block to control spacing and alignment */
.address-text-review {
  width: 90%; /* Match the width of the input container for alignment */
}
.address-text-review p {
  margin: 0; /* Removes default top/bottom margins from the paragraph */
  line-height: 1.4; /* Sets a comfortable spacing between each line of the address */
  font-size: 1rem; /* Explicitly sets font size (equivalent to 16px by default) */
}

/* Postage Area on Review Postcard */
.postage-area-review {
    position: absolute; /* Positioned relative to .postcard-back-right-area */
    top: 5%;
    padding-left: 35%;
    width: 100%;
    height: 30%; /* Takes up top 30% of its parent (.postcard-back-right-area) */
}

.stamp-img {
    position: absolute;
    right: 9%; /* Small offset from the edge */
    height: 100%;
    z-index: 1; /* Position stamp below the postmark */
}

.postmark-container {
    position: absolute;
    height: 85%; /* A reasonable height for the postmark */
    display: flex;
    align-items: center;
    justify-content: flex-start; /* Align text to the left */
    z-index: 2; /* Position postmark above the stamp */
}

.postmark-img {
    height: 90%;
    pointer-events: none;
    transform: rotate(-9deg); /* Slight rotation for a dynamic look */
}

/* Order Confirmation Page Specific Styles
-------------------------------------------------- */
.confirmation-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem; /* Adds spacing between elements */
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.confirmation-container .section-subtitle {
  text-align: center; /* Ensures subtitles are centered */
}

.confirmation-container #feedback_input {
  width: 100%; /* Let it take more width within the centered container */
  max-width: 500px; /* But constrain it for better appearance */
}

#postcard-back-message-input {
    font-family: inherit;
    transition: font-family 0.2s;
}

/* Font Selector Custom Dropdown Styles
-------------------------------------------------- */

/* Container to position the options relative to the button */
.font-selector-container {
    position: relative;
    display: inline-block;
}

/* The dropdown panel for font options */
.font-options {
    position: absolute;
    bottom: 100%; /* Position it above the button */
    left: 0;
    z-index: 1000;
    background-color: white;
    border: 1px solid #ccc;
    border-radius: 3px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    min-width: 160px;
    padding: 5px 0;
    margin-bottom: 5px; /* Space between button and options */
}

/* Individual font option style */
.font-option {
    padding: 8px 16px;
    cursor: pointer;
    white-space: nowrap;
}
.font-option:hover {
    background-color: #f0f0f0;
}

.font-signature-group {
  display: flex;
  flex-direction: row !important;
  gap: 10px;
  justify-content: center;
  align-items: center;
}

/* Always keep font and signature buttons horizontal */
.postcard-panel.postcard-back-panel .postcard-controls {
  flex-direction: row !important;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

/* --- Google Places Autocomplete --- */
.gmp-autocomplete-input {
  display: block;
  width: 100%;
  margin-bottom: 10px;
}
.gmp-autocomplete-input::part(icon) {
  display: none;
}
.gmp-autocomplete-input::part(input) {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 16px;
  box-sizing: border-box;
  font-family: 'Noto Sans', 'Plus Jakarta Sans', sans-serif;
}
/* Prevent placeholder text from being uppercased on the State input */
#addressState::placeholder {
  text-transform: none;
}

/* --- Discount Code Section --- */
.discount-code-container {
    margin-top: 1.5rem;
    border-top: 1px solid #e0e0e0;
    padding-top: 1.5rem;
}

#discount-form {
    display: flex;
    gap: 8px;
    align-items: center;
}

#discountCodeInput {
    flex-grow: 1;
    padding: 12px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 16px;
    box-sizing: border-box;
    font-family: "Noto Sans", sans-serif;
}

#applyDiscountButton {
    background-color: #6c757d; /* Match .button-secondary */
    color: white;
    border-radius: 4px; /* Match input field, override global button style */
    flex-shrink: 0;
}

#applyDiscountButton:hover {
    background-color: #5a6268; /* Match .button-secondary:hover */
}

#discountMessage {
    margin-top: 10px;
    font-size: 0.9rem;
    min-height: 1.2em; /* Reserve space to prevent layout shift */
    text-align: left;
}

#discountMessage.success {
    color: #28a745; /* Green for success */
}

#discountMessage.error {
    color: #dc3545; /* Red for error */
}

/* For the price breakdown */
#discountDisplay {
    color: #28a745; /* Green for success */
    font-weight: bold;
}

/* Accessibility class to hide elements visually but not from screen readers */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}