/* ============================================================
   Rika Garden — Sepet & Ödeme Sayfası Stilleri
   cart.php, cart-totals.php, checkout/form-checkout.php
   ============================================================ */

/* ── Ödemeye git butonu (WC proceed to checkout) ── */
.wc-proceed-to-checkout a.checkout-button,
.wc-proceed-to-checkout a,
.woocommerce-cart .wc-proceed-to-checkout a {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  background-color: #4a7c2f !important;
  color: #fff !important;
  font-weight: 700 !important;
  font-size: 0.9375rem !important;
  padding: 0.875rem 1.5rem !important;
  border-radius: 0.75rem !important;
  border: none !important;
  text-decoration: none !important;
  transition:
    background-color 0.2s,
    box-shadow 0.2s !important;
  box-shadow: 0 4px 12px rgba(74, 124, 47, 0.2) !important;
  margin-top: 0 !important;
}
.wc-proceed-to-checkout a.checkout-button:hover,
.wc-proceed-to-checkout a:hover,
.woocommerce-cart .wc-proceed-to-checkout a:hover {
  background-color: #6aaf35 !important;
  box-shadow: 0 6px 18px rgba(74, 124, 47, 0.3) !important;
  color: #fff !important;
}

/* ── Sepet toplamları (cart totals) ── */
.rg-cart-totals .cart_totals,
.woocommerce-cart .cart_totals {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
}
.rg-cart-totals .cart_totals h2 {
  display: none !important;
}

.rg-cart-totals table.shop_table {
  width: 100% !important;
  border-collapse: collapse !important;
  border: none !important;
  background: transparent !important;
}
.rg-cart-totals table.shop_table th,
.rg-cart-totals table.shop_table td {
  padding: 0.625rem 0 !important;
  border: none !important;
  background: transparent !important;
  font-size: 0.875rem !important;
}
.rg-cart-totals table.shop_table th {
  font-weight: 600 !important;
  color: #545454 !important;
  text-align: left !important;
}
.rg-cart-totals table.shop_table td {
  text-align: right !important;
  font-weight: 600 !important;
  color: #2e2e2e !important;
}
.rg-cart-totals table.shop_table .order-total th,
.rg-cart-totals table.shop_table .order-total td {
  font-weight: 800 !important;
  font-size: 1rem !important;
  padding-top: 0.875rem !important;
  border-top: 1px solid #f0f0f0 !important;
}
.rg-cart-totals table.shop_table .order-total td {
  color: #4a7c2f !important;
}

.rg-cart-totals .wc-proceed-to-checkout {
  margin-top: 1rem !important;
}
.rg-cart-totals .wc-proceed-to-checkout a.checkout-button,
.rg-cart-totals .checkout-button {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0.5rem !important;
  width: 100% !important;
  background-color: #4a7c2f !important;
  color: #fff !important;
  font-weight: 700 !important;
  font-size: 0.9375rem !important;
  padding: 0.875rem 1.5rem !important;
  border-radius: 0.75rem !important;
  border: none !important;
  text-decoration: none !important;
  transition:
    background-color 0.2s,
    box-shadow 0.2s !important;
  box-shadow: 0 4px 12px rgba(74, 124, 47, 0.2) !important;
}
.rg-cart-totals .wc-proceed-to-checkout a.checkout-button:hover,
.rg-cart-totals .checkout-button:hover {
  background-color: #6aaf35 !important;
  box-shadow: 0 6px 18px rgba(74, 124, 47, 0.3) !important;
}

/* ── cart-totals.php override versiyonu için ── */
.cart_totals .wc-proceed-to-checkout a,
.cart_totals .wc-proceed-to-checkout .button {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  background-color: #4a7c2f !important;
  color: #fff !important;
  font-weight: 700 !important;
  font-size: 0.9375rem !important;
  padding: 0.875rem 1.5rem !important;
  border-radius: 0.75rem !important;
  border: none !important;
  text-decoration: none !important;
  transition: background-color 0.2s !important;
}
.cart_totals .wc-proceed-to-checkout a:hover {
  background-color: #6aaf35 !important;
  color: #fff !important;
}

/* ── WooCommerce kargo satırı ── */
.woocommerce table.shop_table .shipping td {
  text-align: left !important;
}

/* ── Checkout form alanları ── */
.rg-checkout-form .form-row {
  margin-bottom: 1rem !important;
}

.rg-checkout-form label {
  display: block !important;
  font-size: 0.8125rem !important;
  font-weight: 600 !important;
  color: #374151 !important;
  margin-bottom: 0.375rem !important;
}
.rg-checkout-form label .required {
  color: #ef4444 !important;
  text-decoration: none !important;
}
.rg-checkout-form input[type="text"],
.rg-checkout-form input[type="email"],
.rg-checkout-form input[type="tel"],
.rg-checkout-form input[type="number"],
.rg-checkout-form input[type="password"],
.rg-checkout-form select,
.rg-checkout-form textarea {
  width: 100% !important;
  border: 1.5px solid #e5e7eb !important;
  border-radius: 0.625rem !important;
  padding: 0.75rem 1rem !important;
  font-size: 0.9375rem !important;
  font-family: "DM Sans", sans-serif !important;
  color: #1a1a1a !important;
  background: #fff !important;
  outline: none !important;
  transition:
    border-color 0.2s,
    box-shadow 0.2s !important;
  box-shadow: none !important;
  appearance: none !important;
  -webkit-appearance: none !important;
}
.rg-checkout-form input:focus,
.rg-checkout-form select:focus,
.rg-checkout-form textarea:focus {
  border-color: #4a7c2f !important;
  box-shadow: 0 0 0 3px rgba(74, 124, 47, 0.12) !important;
}
.rg-checkout-form .woocommerce-input-wrapper {
  width: 100% !important;
  display: block !important;
}
.rg-checkout-form .form-row-first,
.rg-checkout-form .form-row-last {
  width: 100% !important;
  float: none !important;
}
@media (min-width: 640px) {
  .rg-checkout-form .form-row-first,
  .rg-checkout-form .form-row-last {
    width: calc(50% - 0.5rem) !important;
    display: inline-block !important;
    vertical-align: top !important;
  }
  .rg-checkout-form .form-row-first {
    margin-right: 0.5rem !important;
  }
  .rg-checkout-form .form-row-last {
    margin-left: 0.5rem !important;
  }
}
/* WooCommerce hata stilleri */
.rg-checkout-form .woocommerce-error,
.rg-checkout-form ul.woocommerce-error {
  background: #fff5f5 !important;
  border: 1px solid #ef4444 !important;
  border-radius: 0.625rem !important;
  padding: 0.75rem 1rem !important;
  color: #b91c1c !important;
  font-size: 0.875rem !important;
  list-style: none !important;
  margin-bottom: 1rem !important;
}

/* ── Ödeme yöntemleri ── */
.rg-order-review .woocommerce-checkout-payment {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
}
.rg-order-review .woocommerce-checkout-payment .payment_methods {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
}
.rg-order-review .woocommerce-checkout-payment .payment_methods li {
  border: 1.5px solid #e5e7eb !important;
  border-radius: 0.625rem !important;
  margin-bottom: 0.5rem !important;
  overflow: hidden !important;
  background: #fff !important;
  transition: border-color 0.2s !important;
}
.rg-order-review
  .woocommerce-checkout-payment
  .payment_methods
  li:has(input:checked) {
  border-color: #4a7c2f !important;
}
.rg-order-review
  .woocommerce-checkout-payment
  .payment_methods
  li.wc_payment_method
  > label {
  display: flex !important;
  align-items: center !important;
  gap: 0.75rem !important;
  padding: 0.875rem 1rem !important;
  cursor: pointer !important;
  font-size: 0.875rem !important;
  font-weight: 600 !important;
  color: #2e2e2e !important;
}
.rg-order-review .woocommerce-checkout-payment .payment_box {
  padding: 0.75rem 1rem 0.875rem !important;
  background: #f9fafb !important;
  border-top: 1px solid #e5e7eb !important;
  font-size: 0.8125rem !important;
  color: #545454 !important;
}

/* Sipariş ver butonu */
.rg-order-review #place_order,
.woocommerce #payment #place_order {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  background-color: #4a7c2f !important;
  color: #fff !important;
  font-weight: 700 !important;
  font-size: 1rem !important;
  padding: 1rem 1.5rem !important;
  border-radius: 0.75rem !important;
  border: none !important;
  cursor: pointer !important;
  transition:
    background-color 0.2s,
    box-shadow 0.2s !important;
  box-shadow: 0 4px 14px rgba(74, 124, 47, 0.25) !important;
  margin-top: 1rem !important;
}
.rg-order-review #place_order:hover,
.woocommerce #payment #place_order:hover {
  background-color: #6aaf35 !important;
  box-shadow: 0 6px 20px rgba(74, 124, 47, 0.35) !important;
}

/* Sipariş inceleme tablosu */
.rg-order-review table.woocommerce-checkout-review-order-table {
  width: 100% !important;
  border-collapse: collapse !important;
  border: none !important;
  font-size: 0.875rem !important;
}
.rg-order-review table.woocommerce-checkout-review-order-table th,
.rg-order-review table.woocommerce-checkout-review-order-table td {
  padding: 0.625rem 1.25rem !important;
  border: none !important;
  border-bottom: 1px solid #f3f4f6 !important;
}
.rg-order-review table.woocommerce-checkout-review-order-table thead th {
  background: #f9fafb !important;
  font-size: 0.75rem !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  color: #9ca3af !important;
  border-bottom: 1px solid #f0f0f0 !important;
}
.rg-order-review table.woocommerce-checkout-review-order-table .order-total th,
.rg-order-review table.woocommerce-checkout-review-order-table .order-total td {
  font-weight: 800 !important;
  font-size: 1rem !important;
  color: #2e2e2e !important;
  border-bottom: none !important;
  padding-top: 0.875rem !important;
}
.rg-order-review table.woocommerce-checkout-review-order-table .order-total td {
  color: #4a7c2f !important;
}

/* ── WooCommerce genel bildirimler ── */
.woocommerce-message,
.woocommerce-error,
.woocommerce-info {
  border-radius: 0.625rem !important;
  padding: 0.875rem 1rem !important;
  margin-bottom: 1.5rem !important;
  font-size: 0.875rem !important;
}
.woocommerce-message {
  background: #f0faf0 !important;
  border-color: #4a7c2f !important;
  color: #2d5a1b !important;
}
.woocommerce-error {
  background: #fff5f5 !important;
  border-color: #ef4444 !important;
  color: #b91c1c !important;
}
.woocommerce-info {
  background: #eff6ff !important;
  border-color: #3b82f6 !important;
  color: #1e40af !important;
}

/* ── Varyasyon native fiyat alanı — #rg-variation-price kullanıldığı için gizle ── */
.woocommerce-variation.single_variation {
  display: none !important;
}

/* ══════════════════════════════════════════════════════════
   Rika Garden — Notice / Alert Sistemi
   .rg-notices-wrapper — sabit konumlu toast container
   .rg-notice          — tek bildirim kutusu
   ══════════════════════════════════════════════════════════ */

/* Toast container — sağ üst, sticky */
.rg-notices-wrapper {
  position: fixed;
  top: 5.5rem; /* header yüksekliğinin altı */
  right: 1.25rem;
  z-index: 9999;
  width: min(22rem, calc(100vw - 2.5rem));
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none; /* Arka planı tıklanabilir bırak */
}

/* Tek bildirim kutusu */
.rg-notice {
  pointer-events: all;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-radius: 0.875rem;
  box-shadow:
    0 4px 6px -1px rgba(0, 0, 0, 0.08),
    0 10px 25px -5px rgba(0, 0, 0, 0.1);
  animation: rgNoticeIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
  border-width: 1px;
  border-style: solid;
}

@keyframes rgNoticeIn {
  from {
    opacity: 0;
    transform: translateX(1.5rem) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateX(0) scale(1);
  }
}

/* İkon sarmalayıcı */
.rg-notice__icon {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Mesaj alanı */
.rg-notice__body {
  flex: 1;
  min-width: 0;
}
.rg-notice__body p,
.rg-notice__body a {
  font-size: 0.8125rem;
  line-height: 1.4;
  font-weight: 500;
}
.rg-notice__body a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Kapat butonu */
.rg-notice__close {
  flex-shrink: 0;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  cursor: pointer;
  opacity: 0.55;
  transition:
    opacity 0.15s,
    background-color 0.15s;
  margin-left: 0.25rem;
  margin-top: 0.05rem;
}
.rg-notice__close:hover {
  opacity: 1;
}

/* ── Tip renkleri ── */

/* Başarı */
.rg-notice--success {
  background-color: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
}
.rg-notice--success .rg-notice__icon {
  background-color: #dcfce7;
  color: #16a34a;
}
.rg-notice--success .rg-notice__close:hover {
  background-color: #dcfce7;
}

/* Hata */
.rg-notice--error {
  background-color: #fef2f2;
  border-color: #fecaca;
  color: #991b1b;
}
.rg-notice--error .rg-notice__icon {
  background-color: #fee2e2;
  color: #dc2626;
}
.rg-notice--error .rg-notice__close:hover {
  background-color: #fee2e2;
}

/* Bilgi */
.rg-notice--info {
  background-color: #eff6ff;
  border-color: #bfdbfe;
  color: #1e40af;
}
.rg-notice--info .rg-notice__icon {
  background-color: #dbeafe;
  color: #2563eb;
}
.rg-notice--info .rg-notice__close:hover {
  background-color: #dbeafe;
}

/* ── Checkout: sipariş notu alanı ── */
.rg-checkout-form .woocommerce-additional-fields {
  margin-top: 0 !important;
}
.rg-checkout-form .woocommerce-additional-fields h3 {
  display: none !important;
}

/* ── Checkout: 2 kolon responsive grid — arbitrary value Tailwind JIT'e bağımlı değil ── */
@media (min-width: 1024px) {
  #checkout-main form.checkout {
    display: block !important;
  }
  #checkout-main form.checkout > .grid {
    display: grid !important;
    grid-template-columns: 1fr 400px !important;
    gap: 1.5rem !important;
    align-items: start !important;
  }
}

/* ── Pay for order (form-pay.php) — ödeme yöntemi stilleri ── */
.rg-pay-form #payment .payment_methods {
  list-style: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
.rg-pay-form #payment .payment_methods li.wc_payment_method {
  padding: 1rem 1.25rem !important;
  margin: 0 !important;
  border: none !important;
  background: transparent !important;
}
.rg-pay-form #payment .payment_methods li.wc_payment_method > label {
  display: flex !important;
  align-items: center !important;
  gap: 0.625rem !important;
  cursor: pointer !important;
  font-size: 0.875rem !important;
  font-weight: 600 !important;
  color: #1a1a1a !important;
  padding: 0 !important;
}
.rg-pay-form #payment .payment_methods li.wc_payment_method > label::before {
  content: "" !important;
  width: 1.125rem !important;
  height: 1.125rem !important;
  border: 1.5px solid #d1d5db !important;
  border-radius: 9999px !important;
  display: inline-block !important;
  flex-shrink: 0 !important;
  transition: all 0.2s !important;
}
.rg-pay-form
  #payment
  .payment_methods
  li.wc_payment_method
  > input[type="radio"] {
  position: absolute !important;
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
}
.rg-pay-form #payment .payment_methods li.wc_payment_method:has(input:checked) {
  background: #f0faf0 !important;
}
.rg-pay-form
  #payment
  .payment_methods
  li.wc_payment_method:has(input:checked)
  > label::before {
  border-color: #4a7c2f !important;
  background: #4a7c2f !important;
  box-shadow: inset 0 0 0 3px #fff !important;
}
.rg-pay-form #payment .payment_methods li.wc_payment_method .payment_box {
  margin-top: 0.5rem !important;
  padding: 0 !important;
  background: transparent !important;
  font-size: 0.8125rem !important;
  color: #6b7280 !important;
}
.rg-pay-form #payment .payment_methods li.wc_payment_method img {
  max-height: 1.5rem !important;
}
.rg-pay-form #place_order {
  margin-top: 0 !important;
}
