/* === Genel Arka Plan ve Karartma === */
body {
  background: url("/assets/frontend/img/sitegörsel/kartonkutu.jpg") no-repeat
    center center fixed;
  background-size: cover;
  position: relative;
}
body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6); /* Arka plan karartma */
  z-index: -1;
}
.mt-4 {
  margin-top: 1rem !important;
}
/* === Navbar Ayarları === */
.navbar {
  background-color: rgba(255, 0, 0, 0.678); /* Şeffaf koyu kırmızı */
}
.navbar-brand img {
  width: 120px;
}
.navbar .nav-link {
  color: #fff;
  transition: color 0.3s ease; /* Hover geçiş efekti */
  font-size: 1.2em;
}
/* === Kapak Konteyneri === */
.cover-container {
  background-color: #fff;
  padding: 25px;
  margin: 20px auto;
  text-align: center;
  border-radius: 10px;
  max-width: 1200px;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15); /* Daha belirgin gölge efekti */
}
.cover-container img {
  width: 100%;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); /* Görsel gölge efekti */
}
.cover-container .custom-text {
  margin-top: 20px;
  font-family: "Arial", sans-serif;
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.6;
  color: #0a0000; /* Koyu bordo */
}

@media (max-width: 768px) {
  .cover-container {
    padding: 15px;
  }
  .cover-container .custom-text {
    font-size: 1rem;
  }
}
.form-container {
  background-color: #fff;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.308); /* Daha belirgin gölge efekti */
  max-width: 1200px; /* Cover container ile eşit genişlik */
  margin: 20px auto;
}
.text-center mb-4 {
  color: #e31e24;
}
/* === Form Elemanları === */
.form-group label {
  font-weight: 600;
  margin-bottom: 5px;
  display: block;
}
.form-group input,
.form-group select {
  border-radius: 5px;
  border: 1px solid #ccc;
  padding: 10px;
  font-size: 1rem;
  width: 100%;
  box-sizing: border-box; /* Taşmaları önler */
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.form-group input:focus,
.form-group select:focus {
  border-color: #e31e24;
  box-shadow: 0 0 5px rgba(217, 83, 79, 0.5);
}

/* === Buton Ayarları === */
button {
  background-color: #e31e24;
  color: #fff;
  font-size: 1.1rem;
  border: none;
  border-radius: 5px;
  padding: 10px 15px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease;
}
button:hover {
  background-color: #e31e24;
  transform: translateY(-3px); /* Hafif yukarı kaldırma efekti */
}

/* === Mobil ve Küçük Ekranlar === */
@media (max-width: 576px) {
  .form-container {
    padding: 20px;
  }
}
/* === Ana Kategoriler (Responsive ve Belirginlik) === */
.radio-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* Desktop için 2 sütun */
  gap: 20px;
  justify-items: center;
  text-align: center;
}
.radio-row input[type="radio"] {
  display: none;
}
.radio-row label {
  padding: 15px 20px;
  font-weight: bold;
  border-radius: 10px;
  border: 2px solid transparent;
  background-color: #ffffff;
  color: #333;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.329);
  transition: all 0.3s ease;
  width: 100%; /* Tam genişlik */
}
.radio-row label:hover {
  background-color: #ff5459;
  color: #ffffff;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}
.radio-row input[type="radio"]:checked + label {
  background-color: #e31e24; /* Seçili kategori kırmızı */
  color: #ffffff;
  border: 2px solid #e31e24;
  box-shadow: 0 0 10px #e31e25ab;
  transform: scale(1.05); /* Hafif büyütme efekti */
}
.radio-row label[for="gida"] {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 60px;
}
.sub-category-grid {
  display: grid;
  grid-template-columns: repeat(
    auto-fill,
    minmax(150px, 1fr)
  ); /* Dinamik kolonlar */
  gap: 20px; /* Kutular arasındaki boşluk */
  justify-content: center;
  margin: 0 auto;
  padding: 20px;
  max-width: 1200px;
}
.is-invalid {
  border: 1px solid #dc3545 !important; /* Bootstrap'in kırmızı hatası */
  background-color: #f8d7da; /* Hafif kırmızı arka plan */
}
.invalid-feedback {
  color: #dc3545; /* Hata mesajı kırmızı */
}

.grid-item {
  text-align: center;
  border: 1px solid #ddd;
  border-radius: 8px;
  padding: 10px;
  background-color: #f8f9fa;
  transition: all 0.3s ease;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.grid-item:hover {
  background-color: #f1f1f1;
  transform: scale(1.05);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
}

.grid-item img {
  max-width: 100px; /* Görsel genişliği */
  height: auto;
  margin-bottom: 8px;
}
.grid-item input[type="radio"] {
  display: none;
}
.grid-item input[type="radio"]:checked + .form-check-label {
  background-color: #e31e24;
  color: #ffffff;
  border-color: #a7161a;
  box-shadow: 0 0 10px rgba(217, 83, 79, 0.5);
}
@media (max-width: 576px) {
  .custom-col {
    flex: 0 0 33.33%; /* Telefonda 3 kutu */
    max-width: 33.33%;
  }
  .radio-row label {
    padding: 5px;
  }
}

@media (min-width: 577px) and (max-width: 768px) {
  .custom-col {
    flex: 0 0 25%; /* Tablette 5 kutu */
    max-width: 25%;
  }
}
@media (min-width: 769px) and (max-width: 992px) {
  .custom-col {
    flex: 0 0 20%; /* Orta ekranda 4 kutu */
    max-width: 20%;
  }
}

@media (min-width: 993px) {
  .custom-col {
    flex: 0 0 16.66%; /* Masaüstünde 6 kutu */
    max-width: 16.66%;
  }
}
@media (min-width: 768px) {
  .col-md-4 {
    flex: 0 0 auto;
    width: 30%;
  }
}
.form-check-input:checked,
.form-check-input:checked:focus {
  background-color: #e31e24;
  border-color: #e31e24;
  box-shadow: 0 0 0 0.25rem #e31e257e;
}

/* === Genel Form Stilleri === */
.custom-box-form {
  background-color: #fff;
  border-radius: 10px;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
  max-width: 1200px;
}

.custom-box-form h3 {
  color: #e31e24;
  font-weight: bold;
  text-align: center;
}

/* === Form Etiketleri ve Giriş Alanları === */
.box-form-label {
  font-weight: bold;
  color: #555;
  margin-bottom: 10px;
  display: block;
}
.box-form-label {
  font-size: 1.1rem;
  margin-bottom: 10px;
  display: block;
  text-align: center;
}

/* === Genel Ayarlar === */
.custom-box-form {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 10px;
  box-sizing: border-box;
}

/* Görsel Seçenekler */
.box-image-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border-radius: 8px;
  background-color: #ffdbdb;
  border: 1px solid #ddd;
  width: 100px;
  margin: 2px auto; /* Center options */
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.box-image-option label {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 8px;
  border-radius: 8px;
  background-color: #ffdbe2;
  border: 1px solid #ddd;
  cursor: pointer;
  transition: all 0.3s ease;
}

.box-image-option img {
  max-width: 100%;
  height: auto;
  margin-bottom: 1px;
  border-radius: 5px;
  border: 2px solid transparent;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.box-image-option span {
  color: #080101;
  font-weight: bold;
  font-size: 0.9rem;
}

/* Hover Durumları */
.box-image-option:hover label {
  background-color: #ffdbdb;
  border-color: #e31e24;
  transform: scale(1.05);
}

.box-image-option:hover img {
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Input Gizleme */
.box-image-option input {
  display: none;
}

/* Seçili Durum */
.box-image-option input:checked + label {
  background-color: #e31e24;
  border-color: #ff0000;
  color: #ffffff;
  font-weight: bold;
  box-shadow: 0 0 15px #e31e25a9;
  transform: scale(1.1);
}

.box-image-option input:checked + label img {
  border: 3px solid #ffdbdb;
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.8);
  transform: scale(1.1);
}

.box-image-option input:checked + label span {
  color: #ffffff;
  font-weight: bold;
}

/* Row Margin Fix for Smaller Screens */
.row {
  justify-content: center; /* Center align rows */
}

/* Grid Sistemi Optimize */
.row.justify-content-center > .col-6 {
  max-width: 100px; /* Görseller için sabit genişlik */
  padding: 10px; /* Aralarına boşluk */
}

/* === Baskı Alanları === */
.print-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 10px; /* Reduced padding for smaller devices */
  border-radius: 10px; /* Slightly rounded corners */
  background-color: #f8f9fa;
  border: 1px solid #ddd;
  margin: 10px auto; /* Adjust spacing between items */
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1); /* Subtle shadow for a clean look */
  max-width: 120px; /* Updated for better scaling on mobile */
}

.print-option img {
  max-width: 100px; /* Adjusted size for responsiveness */
  height: auto;
  margin-bottom: 8px; /* Adjusted spacing */
  border-radius: 8px; /* Rounded image corners */
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Hover Durumu */
.print-option:hover {
  background-color: #ffe6e6;
  border-color: #e31e24;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2); /* Enhanced shadow effect */
}

.print-option:hover img {
  transform: scale(1.05); /* Slight zoom effect */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Seçili Durum */
.print-option input {
  display: none;
}

.print-option input:checked + img {
  border: 4px solid#E31E24;
  box-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
}

.print-option input:checked + span {
  color: #e31e24;
  font-weight: bold;
}
@media (max-width: 576px) {
  .print-option {
    max-width: 100px; /* Adjusted for small devices */
  }

  .print-option img {
    max-width: 90px; /* Smaller images for mobile */
  }

  .print-option span {
    font-size: 0.7rem; /* Compact text for small screens */
  }
}
@media (min-width: 992px) {
  .custom-row-cols-lg-7 > * {
    flex: 0 0 calc(100% / 7); /* Her kolon genişliği */
    max-width: calc(100% / 7);
  }
}
/* === Onay Kutuları Stil === */
.agreement-section {
  margin-top: 20px;
  background-color: #f8f9faee;
  border-radius: 10px;
  padding: 15px; /* Daha az boşluk */
  text-align: left; /* Yazıyı sola hizala */
  font-size: 0.9rem; /* Yazı boyutunu küçült */
  line-height: 1.4; /* Satır aralarını sıkılaştır */
}

/* Onay kutularının yazı stili */
.form-check-label {
  font-size: 0.85rem; /* Yazıyı küçült */
  line-height: 1.3; /* Daha az yer kaplaması için satır yüksekliği */
}

/* Mobil cihazlar için özel ayar */
@media (max-width: 576px) {
  .agreement-section {
    font-size: 0.8rem; /* Küçük ekranlarda yazı boyutunu daha da küçült */
    padding: 10px; /* Daha az boşluk */
  }
  .form-check-label {
    font-size: 0.75rem; /* Küçük ekranlarda yazıyı daha da küçült */
  }
}

/* Checkbox boyutunu küçült */
.form-check-input {
  border: var(--bs-border-width) solid #de1717;
  width: 15px; /* Boyutu küçült */
  height: 15px; /* Boyutu küçült */
  margin-right: 8px; /* Yazı ile checkbox arasındaki mesafeyi azalt */
}

/* === Mobilde Görünüm === */
@media (max-width: 576px) {
  .form-check-label {
    font-size: 0.8rem;
    line-height: 1.4;
  }
}
.box-form-input,
.box-form-select {
  width: 100%;
  border: 1px solid #2b2a2ac9;
  border-radius: 5px;
  padding: 10px;
  margin-top: 5px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.089);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.h5.text-center {
  margin-top: 20px;
}

@media (max-width: 768px) {
  .custom-delivery-form .form-group > div {
    min-width: 100%;
  }
}
.custom-delivery-form button:hover {
  background-color: #d41c1f;
}

#alertMessage {
  margin-bottom: 15px;
}
.alert {
  padding: 10px;
  border-radius: 5px;
}
.alert-success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}
.alert-danger {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}
/* Genel Ayarlar */
.custom-delivery-form .row {
  display: flex;
  gap: 15px; /* Kutular arası mesafe */
  align-items: center;
  flex-wrap: nowrap;
  justify-content: flex-start;
}

/* İl ve İlçe Alanlarını Dengeli Yap */
.custom-delivery-form .col-md-3 {
  flex: 0 0 20%;
  min-width: 170px;
}

/* Mesaj Alanını Geniş Tut */
.custom-delivery-form .col-md-4 {
  flex: 1;
  min-width: 250px;
}

/* Mesaj Kutusu İçin Konteyner */
.message-container {
  position: relative;
  display: flex;
  align-items: flex-start;
}

.message-container textarea {
  width: 100%;
  height: auto;
  min-height: 38px; /* Minimum yükseklik */
  line-height: 1.4;
  vertical-align: top; /* İmlecin yukarıda başlamasını sağlar */
  resize: none;
  padding: 8px 50px 8px 8px; /* İç boşlukları düzenle */
}

/* Karakter Sayacı İçin (Mesaj Kutusunun İçinde) */
.message-counter {
  position: absolute;
  right: 10px;
  bottom: 50%;
  transform: translateY(50%);
  font-size: 12px;
  color: gray;
  background: white;
  padding: 2px 5px;
  border-radius: 4px;
  pointer-events: none;
}

/* Küçük Ekranlarda Sayacı Mesaj Kutusunun Altına Al */
@media (max-width: 768px) {
  .custom-delivery-form .row {
    flex-direction: column;
    gap: 10px;
  }

  .custom-delivery-form .col-md-3,
  .custom-delivery-form .col-md-4 {
    width: 100%;
  }

  .message-container {
    flex-direction: column;
    align-items: flex-start;
  }

  .message-counter {
    position: static;
    align-self: flex-end;
    margin-top: 5px;
  }

  .message-container textarea {
    height: auto;
    padding-right: 10px;
  }
}

.form-control {
  border: 1px solid #080101 !important;
}

#submitButton {
  pointer-events: auto; /* Tıklanabilir olmasını sağlar */
}

/* Genel Buton Stili (Animasyonları Kaldırdık) */
.submitButton,
.submitWithoutReset {
  font-size: 14px; /* Yazı boyutunu küçült */
  padding: 8px 16px; /* Buton iç boşluğunu küçült */
  border-radius: 6px; /* Köşeleri yumuşat */
  border: none; /* Kenarlık kaldır */
  cursor: pointer; /* Üzerine gelince el simgesi çıksın */
  transition: none !important; /* Hareket ve animasyonları iptal et */
  transform: none !important;
  box-shadow: none !important;
}

/* İlk Buton (Formu Gönder) - Kırmızı */
.submitButton {
  background-color: #dc3545 !important; /* Kırmızı */
  color: white !important;
}

.submitButton:hover,
.submitButton:focus,
.submitButton:active {
  background-color: #b52b3a !important; /* Daha koyu kırmızı */
  border-color: #b52b3a !important;
}

/* İkinci Buton (Formu Gönder ve Yeniden Form Oluştur) - Mavi */
.submitWithoutReset {
  background-color: #1139ff !important; /* Mavi */
  color: white !important;
}

.submitWithoutReset:hover,
.submitWithoutReset:focus,
.submitWithoutReset:active {
  background-color: #0d2ecc !important; /* Daha koyu mavi */
  border-color: #0d2ecc !important;
}
