body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}
.button-container {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}
/* Add compact mode styles */
body.compact-mode #loading-screen {
  height: 50%;
  top: 0%; /* Center vertically */
}

body.compact-mode .loading-content {
  max-width: 90%;
  padding: 1rem;
}

body.compact-mode #progress-bar {
  margin-bottom: 10px;
}

body.compact-mode #roof-fact {
  font-size: 0.9rem;
  margin-top: 10px;
}

 /* Compact mode styles */
 body.compact-mode {
  background: none;
  align-items: flex-start;
}

body.compact-mode .background-container {
  display: none;
}

body.compact-mode .container {
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  margin: 0;
  padding: 1.5rem;
  max-width: 100%;
}

body.compact-mode h1 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}
.btn-secondary {
  color: white;
  border: none;
  padding: 10px 20px;
  cursor: pointer;
  border-radius: 4px;
  font-size: 16px;
}

.btn-secondary:hover {
  background-color: #5a6268;
}

.background-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url("https://ironriverco.com/wp-content/uploads/2019/03/roof-replacement-guide-minneapolis-st-paul-01.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  filter: brightness(0.7);
  z-index: -1;
}

.container {
  background-color: rgba(255, 255, 255, 0.9);
  padding: 2rem;
  border-radius: 5px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  max-width: 600px;
  width: 90%;
  position: relative;
  z-index: 1;
}

h1 {
  text-align: center;
  color: #333;
  text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.8);
}

button {
  background-color: #4caf50;
  color: white;
  padding: 12px 24px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 16px;
  margin-top: 20px;
  transition: all 0.3s ease;
  min-width: 100px; /* Prevent button width changes */
  height: 48px; /* Fixed height to prevent shifts */
}

button:hover {
  background-color: #45a049;
  transform: translateY(-2px);
}

button:disabled {
  background-color: #cccccc;
  color: #666666;
  cursor: not-allowed;
  opacity: 0.7;
}

button:disabled:hover {
  opacity: 0.7;
}

input[type="text"],
input[type="number"] {
  width: 100%;
  padding: 10px;
  margin: 10px 0;
  border: 1px solid #ddd;
  border-radius: 4px;
  box-sizing: border-box;
  height: 44px; /* Fixed height to prevent layout shifts */
  font-size: 16px; /* Prevent zoom on iOS */
}

.options-container {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.option-btn {
  flex: 0 0 calc(50% - 5px);
  padding: 10px;
  background-color: #3498db;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  text-align: center;
  transition: all 0.3s;
  color: white;
  font-weight: bold;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.option-btn.yes {
  background-color: #2ecc71;
}

.option-btn.no {
  background-color: #e74c3c;
}

.option-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.option-btn.selected {
  background-color: #2ecc71;
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.option-btn.full-width {
  flex: 0 0 100%;
}

img {
  max-width: 100%;
  height: auto;
  margin-bottom: 20px;
  border-radius: 4px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

@media (max-width: 600px) {
  .options-container {
    flex-direction: column;
  }

  .option-btn {
    flex: 0 0 100%;
    margin-bottom: 10px;
  }
}

.pac-container {
  background-color: #fff;
  position: absolute !important;
  z-index: 1000;
  border-radius: 2px;
  border-top: 1px solid #d9d9d9;
  font-family: Arial, sans-serif;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  overflow: hidden;
}

.pac-item {
  cursor: default;
  padding: 0 4px;
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
  line-height: 30px;
  text-align: left;
  border-top: 1px solid #e6e6e6;
  font-size: 11px;
  color: #999;
}

.pac-item:hover {
  background-color: #fafafa;
}

.pac-item-selected,
.pac-item-selected:hover {
  background-color: #ebf2fe;
}

.pac-matched {
  font-weight: 700;
}

.pac-item-query {
  font-size: 13px;
  padding-right: 3px;
  color: #000;
}

#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(244, 244, 244, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
}

.loading-content {
  background-color: white;
  padding: 2rem;
  border-radius: 5px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  max-width: 600px;
  width: 100%;
  text-align: center;
}

#progress-bar {
  width: 100%;
  background-color: #f3f3f3;
  border-radius: 13px;
  padding: 3px;
  margin-bottom: 20px;
}

#progress {
  width: 0%;
  height: 20px;
  background-color: #4caf50;
  border-radius: 10px;
  transition: width 0.5s ease-in-out;
}

.loading-content p {
  margin: 10px 0;
  font-size: 16px;
  color: #333;
}

#roof-fact {
  font-style: italic;
  color: #666;
  text-align: center;
}

.error-message {
  color: #ff0000;
  margin-top: 10px;
  font-size: 14px;
  text-align: center;
}

@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOutLeft {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(-100%);
    opacity: 0;
  }
}

.question-slide-in {
  animation: slideInRight 0.5s forwards;
}

.question-slide-out {
  animation: slideOutLeft 0.5s forwards;
}

#question-container {
  position: relative;
  overflow: hidden;
  min-height: 200px; /* Reserve space for questions */
}

#question-container h2 {
  margin-top: 0;
  margin-bottom: 1rem;
  min-height: 32px; /* Reserve space for question text */
}

.sub-headline {
  font-size: 14px;
  color: #666;
  margin-top: -10px;
  margin-bottom: 20px;
  font-style: italic;
}

#survey-progress-container {
  width: 100%;
  background-color: #e0e0e0;
  border-radius: 20px;
  padding: 4px;
  margin-top: 20px;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
  height: 20px; /* Fixed height to prevent shifts */
}

#survey-progress-bar {
  width: 0%;
  height: 12px;
  background: linear-gradient(90deg, #4caf50, #45a049);
  border-radius: 10px;
  transition: width 0.5s ease-in-out;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.2);
  position: relative;
  overflow: hidden;
}

#survey-progress-bar::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    45deg,
    rgba(255, 255, 255, 0.2) 25%,
    transparent 25%,
    transparent 50%,
    rgba(255, 255, 255, 0.2) 50%,
    rgba(255, 255, 255, 0.2) 75%,
    transparent 75%,
    transparent
  );
  background-size: 20px 20px;
  animation: moveStripes 1s linear infinite;
}

@keyframes moveStripes {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 20px 0;
  }
}
.summary-title {
  text-align: center;
  color: #2ecc71;
  font-size: 28px;
  margin-bottom: 20px;
}

.summary-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.summary-image {
  max-width: 100%;
  height: auto;
  margin-bottom: 20px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.summary-details {
  background-color: #f9f9f9;
  border-radius: 8px;
  padding: 20px;
  width: 100%;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.summary-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
  padding-bottom: 15px;
  border-bottom: 1px solid #e0e0e0;
}

.summary-item:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.summary-label {
  font-weight: bold;
  color: #333;
}

.summary-value {
  color: #2ecc71;
  font-weight: bold;
}

.summary-message {
  text-align: center;
  margin-top: 20px;
  padding: 15px;
  background-color: #e8f8f5;
  border-radius: 8px;
  color: #27ae60;
  font-weight: bold;
}
.call-now-container {
  margin-top: 20px;
  text-align: center;
}

.call-now-button {
  display: inline-block;
  padding: 10px 20px;
  background-color: #4caf50;
  color: white;
  text-decoration: none;
  border-radius: 5px;
  font-weight: bold;
  transition: background-color 0.3s;
}

.call-now-button:hover {
  background-color: #45a049;
}

.text-red-bold {
  color: red;
  font-weight: bold;
}
/* Existing styles here */

/* Media Queries for Mobile Devices */
@media screen and (max-width: 600px) {
  .container {
    width: 100%;
    padding: 10px;
    box-sizing: border-box;
  }

  h1 {
    font-size: 24px;
  }

  #question-container h2 {
    font-size: 20px;
  }

  input[type="text"],
  input[type="number"],
  select {
    width: 100%;
    font-size: 16px;
    padding: 10px;
    box-sizing: border-box;
  }

  button {
    width: 100%;
    padding: 12px;
    font-size: 16px;
  }

  #loading-screen .loading-content {
    width: 90%;
  }

  #progress-bar {
    width: 100%;
  }

  body {
    padding: 0;
  }

  #survey-container {
    width: 100%;
  }
}

/* Phone validation styles */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

#phone-validation-feedback {
  margin-top: 8px;
  font-size: 14px;
  min-height: 20px;
  transition: all 0.3s ease;
}
