/**
 * Rental Form Popup
 * Modern popup design for rental form
 */

:root {
  --rental-primary: #c80b0f;
  --rental-primary-hover: #a0080c;
  --rental-body-color: #212529;
  --rental-text-color: #ffffff;
  --rental-border-color: rgba(255, 255, 255, 0.1);
}

/* Popup Overlay */
.rental-form-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.rental-form-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* Modal Container */
.rental-form-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  max-width: 1280px;
  width: 90%;
  max-height: 85vh;
  background: #0F1B25;
  border-radius: 20px;
  overflow: visible;
  z-index: 1001;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  position: relative;
}

.rental-form-overlay.active .rental-form-modal {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

/* Close Button */
.rental-form-close {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%) translateY(-50%);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #6C727D;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1003;
  transition: background 0.35s ease, transform 0.35s ease;
  padding: 0;
  color: white;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.rental-form-close:hover {
  background: var(--rental-primary);
  transform: translateX(-50%) translateY(-50%) rotate(-180deg);
}

.rental-form-close svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  fill: none;
}

/* Popup Trigger Button (Kiralama Butonu) - Dinamik konum */
.rental-form-trigger {
  position: fixed;
  bottom: 130px; /* Varsayılan: Product request trigger'ın konumu (JavaScript ile dinamik olarak güncellenecek) */
  left: 20px;
  width: 50px;
  height: 50px;
  background: #c80b0f;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  z-index: 998; /* Product request trigger'dan (999) bir altında */
  display: none; /* Başlangıçta gizli, ürün eklendiğinde gösterilecek */
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(200, 11, 15, 0.4);
  transition: bottom 0.3s ease, all 0.3s ease; /* bottom transition eklendi */
  color: white;
}

.rental-form-trigger:hover {
  background: linear-gradient(135deg, #c80b0f, #c80b0f);
  transform: scale(1.1);
  box-shadow:0 4px 20px rgba(200, 11, 15, 0.4);
}

.rental-form-trigger svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.rental-form-badge {
  position: absolute;
  top: -5px;
  right: -5px;
  background: #ffffff;
  color: var(--rental-primary);
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.rental-form-trigger .rental-form-tooltip {
  position: absolute;
  backface-visibility: visible;
  background: linear-gradient(135deg, #c80b0f, #a0080c, #e01a1f);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  line-height: 1;
  padding: 10px 15px;
  border-radius: 20px;
  top: 50%;
  transform: translateY(-50%);
  left: calc(100% + 10px);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.rental-form-trigger:hover .rental-form-tooltip {
  opacity: 1;
  transform: translateY(-50%) translateX(15px);
}

.rental-form-trigger svg {
  stroke: currentColor;
  fill: none;
}

/* Left Side - Product List */
.rental-form-list-wrapper {
  position: relative;
  background: #2C2F36;
  padding: 60px 40px 40px;
  overflow-y: auto;
  max-height: 85vh;
  border-radius: 20px 0 0 20px;
  display: flex;
  flex-direction: column;
}

.rental-form-list-title {
  color: var(--rental-text-color);
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 30px;
  font-family: 'Montserrat', sans-serif;
}

.rental-form-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.rental-form-item {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--rental-border-color);
  border-radius: 12px;
  padding: 15px;
  display: grid;
  grid-template-columns: 80px 1fr auto;
  gap: 15px;
  align-items: center;
  transition: all 0.3s ease;
}

.rental-form-item:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--rental-primary);
}

.rental-form-item img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.rental-form-item-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.rental-form-item span {
  color: var(--rental-text-color);
  font-size: 16px;
  font-weight: 600;
  margin: 0;
  line-height: 1.3;
}

.rental-form-item-price {
  color: var(--rental-primary);
  font-size: 15px;
  font-weight: 700;
}

.rental-form-item input {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--rental-border-color);
  border-radius: 6px;
  padding: 8px 12px;
  color: var(--rental-text-color);
  font-size: 13px;
  width: 100%;
  transition: all 0.3s ease;
}

.rental-form-item input:focus {
  outline: none;
  border-color: var(--rental-primary);
  background: rgba(255, 255, 255, 0.08);
}

.rental-form-item input::placeholder {
  color: rgba(255, 255, 255, 0.4);
}

.rental-form-remove {
  background: rgba(200, 11, 15, 0.1);
  border: 1px solid rgba(200, 11, 15, 0.3);
  color: var(--rental-primary);
  border-radius: 8px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 20px;
  transition: all 0.3s ease;
}

.rental-form-remove:hover {
  background: var(--rental-primary);
  color: white;
  transform: scale(1.1);
}

.rental-form-remove svg {
  width: 18px;
  height: 18px;
}

.rental-form-empty {
  text-align: center;
  padding: 60px 20px;
  color: rgba(255, 255, 255, 0.5);
}

.rental-form-empty svg {
  width: 80px;
  height: 80px;
  margin-bottom: 20px;
  opacity: 0.3;
}

.rental-form-empty p {
  font-size: 16px;
  margin: 0;
}

/* Right Side - Form Wrapper */
.rental-form-wrapper {
  background: #0F1B25;
  padding: 50px 50px 35px 50px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  max-height: 85vh;
  border-radius: 0 20px 20px 0;
  justify-content: flex-start;
  align-items: stretch;
}

.rental-form-title {
  color: var(--rental-text-color);
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 10px;
  font-family: 'Montserrat', sans-serif;
}

.rental-form-subtitle {
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
  margin-bottom: 30px;
}

.rental-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.rental-form-group {
  position: relative;
}

/* Form Label - Positioned on Border */
.rental-form-group label {
  position: absolute;
  left: 15px;
  top: 0;
  transform: translateY(-50%);
  background: #0F1B25;
  padding: 0 15px;
  color: white;
  font-size: 14px;
  font-weight: 300;
  line-height: 1;
  white-space: nowrap;
  z-index: 2;
  transition: all 0.35s ease;
  pointer-events: none;
}

/* Focus state for labels */
.rental-form-group input:focus + label,
.rental-form-group select:focus + label {
  color: var(--rental-primary);
  font-weight: 700;
}

/* Form Inputs */
.rental-form-group input,
.rental-form-group select {
  width: 100% !important;
  height: 65px !important;
  padding: 0 25px !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 10px !important;
  color: white !important;
  font-size: 15px !important;
  font-weight: 300 !important;
  line-height: normal !important;
  transition: all 0.35s ease;
  font-family: 'Montserrat', sans-serif;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.1) !important;
  outline: none !important;
}

.rental-form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='white' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 20px center;
  background-size: 12px;
  padding-right: 50px !important;
  cursor: pointer;
}

.rental-form-group select option {
  background: #2C2F36;
  color: white;
  padding: 10px;
}

.rental-form-group input::placeholder {
  color: rgba(255, 255, 255, 0.3) !important;
}

.rental-form-group input:focus,
.rental-form-group select:focus {
  box-shadow: 0 0 0 2px var(--rental-primary) !important;
}

/* Form Select Styling */
.rental-form-select {
  cursor: pointer;
}

/* Checkbox Wrapper */
.rental-form-checkbox-wrapper {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 20px;
  margin-top: 15px;
  margin-bottom: 15px;
}

.rental-form-checkbox-container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  width: 35px;
  height: 35px;
}

.rental-form-checkbox {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 10;
  margin: 0;
  pointer-events: auto;
}

.rental-form-checkbox-box {
  position: relative;
  width: 35px;
  height: 35px;
  flex-shrink: 0;
  border-radius: 8px;
  background: transparent;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.3);
  transition: all 0.35s ease;
  cursor: pointer;
  pointer-events: auto;
  z-index: 5;
}

.rental-form-checkbox:hover ~ .rental-form-checkbox-box {
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.5);
}

.rental-form-checkbox:checked ~ .rental-form-checkbox-box {
  box-shadow: 0 0 0 1px var(--rental-primary);
}

.rental-form-checkbox-box::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 40%;
  height: 40%;
  border-radius: 5px;
  background: var(--rental-primary);
  opacity: 0;
  transition: all 0.35s ease;
}

.rental-form-checkbox:checked ~ .rental-form-checkbox-box::before {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

.rental-form-checkbox-label {
  color: rgba(255, 255, 255, 0.7);
  font-size: 14px;
  font-weight: 300;
  line-height: 1.5;
  display: inline;
  cursor: pointer;
}

.rental-form-checkbox-label a {
  position: relative;
  z-index: 20;
  display: inline-block;
  color: var(--rental-primary);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.35s ease;
}

.rental-form-checkbox-label a:hover {
  color: var(--rental-primary-hover);
}

/* Submit Button */
.rental-form-button-field {
  margin-top: 10px;
}

.rental-form-submit {
  width: 100%;
  height: 60px;
  background: var(--rental-primary);
  border: none;
  border-radius: 10px;
  color: white;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Montserrat', sans-serif;
}

.rental-form-submit:hover {
  background: var(--rental-primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(200, 11, 15, 0.4);
}

.rental-form-submit:active {
  transform: translateY(0);
}

.rental-form-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.rental-form-submit-text {
  position: relative;
  z-index: 2;
}

.rental-form-submit-circle {
  position: absolute;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.rental-form-submit:hover .rental-form-submit-circle {
  width: 300px;
  height: 300px;
}

/* Form Response Messages */
.rental-form-response-output {
  display: none;
  margin: 15px 0;
}

.rental-form-message {
  padding: 15px 20px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  animation: slideIn 0.3s ease;
}

.rental-form-message.success {
  background: rgba(46, 213, 115, 0.15);
  color: #2ed573;
  border: 1px solid rgba(46, 213, 115, 0.3);
}

.rental-form-message.error {
  background: rgba(255, 107, 107, 0.15);
  color: #ff6b6b;
  border: 1px solid rgba(255, 107, 107, 0.3);
}

/* Form Error Messages */
.rental-form-error {
  display: none;
  color: #ff6b6b;
  font-size: 12px;
  margin-top: 5px;
  font-weight: 400;
  line-height: 1.4;
}

.rental-form-group input.error,
.rental-form-group select.error,
.rental-form-group textarea.error {
  box-shadow: 0 0 0 1px #ff6b6b !important;
}

.rental-form-checkbox-wrapper .rental-form-error {
  margin-top: 8px;
  margin-left: 0;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Contact Info */
.rental-form-contact-info {
  margin-top: 40px;
  padding-top: 30px;
  border-top: 1px solid var(--rental-border-color);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.rental-form-contact-item {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.7);
  transition: color 0.3s ease;
}

.rental-form-contact-item:hover {
  color: var(--rental-primary);
}

.rental-form-contact-icon {
  width: 40px;
  height: 40px;
  background: rgba(200, 11, 15, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.rental-form-contact-icon svg {
  width: 18px;
  height: 18px;
  stroke: var(--rental-primary);
}

.rental-form-contact-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rental-form-contact-label {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.5);
}

.rental-form-contact-number {
  font-size: 14px;
  font-weight: 500;
}

/* KVKK Popup */
.rental-form-kvkk-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1002;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.35s ease, visibility 0.35s ease;
  padding: 20px;
}

.rental-form-kvkk-overlay.active {
  opacity: 1;
  visibility: visible;
}

.rental-form-kvkk-modal {
  position: relative;
  background: var(--rental-text-color);
  border-radius: 20px;
  width: 100%;
  max-width: 800px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: visible;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.rental-form-kvkk-close {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%) translateY(-50%);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #6C727D;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 40;
  transition: background 0.35s ease, transform 0.35s ease;
  padding: 0;
  color: white;
}

.rental-form-kvkk-close:hover {
  background: var(--rental-primary);
  transform: translateX(-50%) translateY(-50%) rotate(-180deg);
}

.rental-form-kvkk-close svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  fill: none;
  transition: transform 0.4s ease;
}

.rental-form-kvkk-content {
  padding: 90px 60px 60px 60px;
  overflow-y: auto;
  overflow-x: hidden;
  color: white;
  background: #0F1B25;
  font-size: 15px;
  font-weight: 300;
  line-height: 1.8;
  flex: 1;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  border-radius: 20px 20px 20px 20px;
  text-align: left;
}

.rental-form-kvkk-content::-webkit-scrollbar {
  width: 8px;
}

.rental-form-kvkk-content::-webkit-scrollbar-track {
  background: transparent;
}

.rental-form-kvkk-content::-webkit-scrollbar-thumb {
  background: rgba(108, 114, 125, 0.5);
  border-radius: 4px;
}

.rental-form-kvkk-content::-webkit-scrollbar-thumb:hover {
  background: rgba(108, 114, 125, 0.7);
}

.rental-form-kvkk-content h1,
.rental-form-kvkk-content h2,
.rental-form-kvkk-content h3,
.rental-form-kvkk-content h4 {
  color: white;
  margin-top: 25px;
  margin-bottom: 15px;
  font-weight: 600;
}

.rental-form-kvkk-content h1 {
  font-size: 24px;
}

.rental-form-kvkk-content h2 {
  font-size: 20px;
}

.rental-form-kvkk-content h3 {
  font-size: 18px;
}

.rental-form-kvkk-content h4 {
  font-size: 16px;
}

.rental-form-kvkk-content p {
  margin-bottom: 15px;
  color: rgba(255, 255, 255, 0.8);
}

.rental-form-kvkk-content strong {
  color: white;
  font-weight: 600;
}

.rental-form-kvkk-content ul,
.rental-form-kvkk-content ol {
  margin: 15px 0;
  padding-left: 25px;
}

.rental-form-kvkk-content li {
  margin-bottom: 10px;
  color: rgba(255, 255, 255, 0.8);
}

.rental-form-kvkk-content a {
  color: var(--rental-primary);
  text-decoration: underline;
  transition: color 0.3s ease;
}

.rental-form-kvkk-content a:hover {
  color: var(--rental-primary-hover);
}

/* Responsive KVKK */
@media (max-width: 768px) {
  .rental-form-kvkk-content {
    padding: 70px 30px 40px 30px;
    font-size: 14px;
  }

  .rental-form-kvkk-close {
    width: 50px;
    height: 50px;
  }

  .rental-form-kvkk-close svg {
    width: 20px;
    height: 20px;
  }

  .rental-form-kvkk-content h1 {
    font-size: 20px;
  }

  .rental-form-kvkk-content h2 {
    font-size: 18px;
  }

  .rental-form-kvkk-content h3 {
    font-size: 16px;
  }
}

/* Responsive */
@media (max-width: 1024px) {
  .rental-form-modal {
    max-width: 90%;
    grid-template-columns: 1fr;
  }

  .rental-form-list-wrapper {
    border-radius: 20px 20px 0 0;
    padding: 40px 30px 30px;
  }

  .rental-form-wrapper {
    padding: 40px 30px 30px;
    border-radius: 0 0 20px 20px;
  }

  .rental-form-title {
    font-size: 24px;
  }

  .rental-form-list-title {
    font-size: 24px;
  }

  .rental-form-contact-info {
    grid-template-columns: 1fr;
  }

  .rental-form-checkbox-wrapper {
    gap: 15px;
  }

  .rental-form-checkbox-box {
    width: 32px;
    height: 32px;
  }

  .rental-form-checkbox-label {
    font-size: 13px;
  }
}

@media (max-width: 768px) {
  .rental-form-modal {
    max-width: 95%;
    max-height: 90vh;
  }

  .rental-form-trigger {
    left: 20px; /* Mobilde soldan 20px - product request trigger ile aynı */
    bottom: 100px; /* Varsayılan: Product request trigger'ın konumu (JavaScript ile dinamik olarak güncellenecek) */
    width: 40px;
    height: 40px;

  }
.rental-form-trigger svg {
    width: 24px;
    height: 24px;
  
}
  .rental-form-list-wrapper {
    padding: 30px 20px 20px;
  }

  .rental-form-wrapper {
    padding: 30px 20px 20px;
  }

  .rental-form-title {
    font-size: 20px;
  }

  .rental-form-list-title {
    font-size: 20px;
  }

  .rental-form-group input,
  .rental-form-group select {
    height: 55px !important;
    font-size: 14px !important;
  }

  .rental-form-submit {
    height: 50px;
    font-size: 14px;
  }

  .rental-form-checkbox-wrapper {
    margin-top: 10px;
    margin-bottom: 10px;
    gap: 12px;
  }

  .rental-form-checkbox-box {
    width: 30px;
    height: 30px;
  }

  .rental-form-checkbox-label {
    font-size: 13px;
  }

  .rental-form-kvkk-content {
    padding: 30px 20px;
  }

  .rental-form-tooltip {
    display: none;
  }
}

