/* === Styles from index.html (first block) === */
body {
  font-family: "Poppins";
  max-width: 800px;
  margin: 30px auto;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 20px;
}

h2 {
  margin-bottom: 50px;
}

.attachments {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(25%, 1fr));
  gap: 15px;
  margin-bottom: 20px;
}

button {
  border: none;
  padding: 15px 50px;
  border-radius: 10px;
  background: #467ff7;
  color: white;
  font-weight: bold;
  cursor: pointer;
}

.attachment {
  background: #f6f8fb;
  border-radius: 10px;
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
}

.attachment img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.add-box {
  border: 2px dashed #ccc;
  background: #f9f9f9;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.add-box .icon {
  font-size: 35px;
  color: #999;
  font-weight: bold;
}

.remove-btn {
  position: absolute;
  top: 5px;
  right: 5px;
  background: black;
  color: white;
  border: none;
  cursor: pointer;
  font-size: 10px;
  padding: 6px 8px;
  border-radius: 100px;
}

#response {
  margin-top: 20px;
  background: #f0f0f0;
  padding: 25px 35px 30px;
  white-space: normal;
  line-height: 1.6;
  border-radius: 10px;
}

#response a {
  font-weight: bold;
  color: #0077cc;
  text-decoration: underline;
}

.error-box {
  background: #ffe0e0;
  color: #a10000;
  padding: 15px;
  border-radius: 8px;
  border: 1px solid #d33;
  font-weight: bold;
  margin-top: 20px;
}

.flashing {
  animation: flashFade 2s infinite;
}

a#noImagesLink {
    text-decoration: none;
    color: gray;
    font-size: 14px;
}

a#yesImagesLink {
    text-decoration: none;
    color: gray;
    font-size: 14px;
}

@keyframes flashFade {
  0% { opacity: 1; }
  50% { opacity: 0.5; }
  100% { opacity: 1; }
}

.fade-in { animation: fadeIn 0.5s ease-in forwards; }
.fade-out { animation: fadeOut 0.5s ease-out forwards; }

@keyframes fadeIn { 0% { opacity: 0; } 100% { opacity: 1; } }
@keyframes fadeOut { 0% { opacity: 1; } 100% { opacity: 0; } }

input[type="file"] { display: none; }

.container-main {
  border: solid 1px #f7f6f6;
  padding: 20px;
  border-radius: 20px;
  margin-top: 50px;
}

.header { display: flex; }

.footer {
  display: flex;
  align-items: center;
  padding: 40px;
  margin-top: 50px;
  color: #b1b1b1;
  font-size: 12px;
}

.phone-scan-div {
  display: flex;
  width: 75%;
  flex-direction: column;
  align-items: center;
  visibility: visible;
  justify-content: flex-end;
}

.phone-scan-div img { width: 50%; border-radius: 20px; }
.phone-scan-div p { font-size: 12px; }

.footer span { padding-right: 50px; }
.footer a { color: #b1b1b1; text-decoration: none; font-size: 12px; }

/** Phone View **/
@media (max-width: 800px) {
  h1 { font-size: 25px !important; }
  .header { flex-direction: column; align-items: center; text-align: center; }
  .attachments { grid-template-columns: none !important; }
  .container-main { padding: 15px; }
  input[type="text"], input[type="tel"] { width: 90% !important; }
  .phone-scan-div { display: none !important; visibility: hidden !important; }
  .footer {
    display: flex;
    align-items: flex-start;
    padding: 20px;
    margin-top: 50px;
    color: #b1b1b1;
    justify-content: space-evenly;
    font-size: 14px;
    flex-direction: column;
    line-height: 30px;
  }
  button { width: 100%; font-size: 16px; }
  .remove-btn { width: 35px; }
  .add-box { height: 100px; }
  body { min-height: 100vh !important; }
}

/* === Styles from estimate.html === */
/* Page styles */
/* Body/layout overrides for estimate page */
/* Keeping general styles shared across pages */

#response-container { display: block; }

#response-message { padding: 10px 40px 10px; }

#response-message p,
#response-message ul { margin: 10px 0; }

#response { margin-top: 20px; background: #f0f0f0; padding: 25px 35px 30px; white-space: normal; line-height: 1.6; border-radius: 10px; }

#response a { font-weight: bold; color: #0077cc; text-decoration: underline; }

.error-box { background: #ffe0e0; color: #a10000; padding: 15px; border-radius: 8px; border: 1px solid #d33; font-weight: bold; margin-top: 20px; }

button { border: none; padding: 15px 50px; border-radius: 10px; background: #467ff7; color: white; font-weight: bold; cursor: pointer; }

.fade-in { animation: fadeIn 0.5s ease-in forwards; }
.fade-out { animation: fadeOut 0.5s ease-out forwards; }

div#response-message { line-height: 35px; }

.footer { display: flex; align-items: center; padding: 40px; margin-top: 50px; color: #b1b1b1; font-size: 12px; }
.footer span { padding-right: 50px; }
.footer a { color: #b1b1b1; text-decoration: none; font-size: 12px; }

@keyframes fadeIn { 0% { opacity: 0; } 100% { opacity: 1; } }
@keyframes fadeOut { 0% { opacity: 1; } 100% { opacity: 0; } }

.flashing { animation: flashFade 2s infinite; }
@keyframes flashFade { 0% { opacity: 1; } 50% { opacity: 0.5; } 100% { opacity: 1; } }

@media (max-width: 800px) {
  .footer {
    display: flex;
    align-items: flex-start;
    padding: 20px;
    margin-top: 50px;
    color: #b1b1b1;
    justify-content: space-evenly;
    font-size: 14px;
    flex-direction: column;
    line-height: 30px;
  }
}

