/* journey-planner.css - Reusable Journey Planner Styles */

/* ========== MODAL BASE STYLES ========== */
.journey-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.journey-modal.open {
  display: flex;
  opacity: 1;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.journey-panel {
  background: white;
  border-radius: 16px;
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.4s ease;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Close Button */
.journey-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: transparent;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #666;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
  z-index: 10;
}

.journey-close:hover {
  background: #f5f5f5;
  color: #333;
}

/* ========== MODAL CONTENT ========== */
.journey-header {
  text-align: center;
  padding: 40px 40px 20px;
  background: linear-gradient(135deg, #f26b1d 0%, #a12a20 100%);
  color: white;
  border-radius: 16px 16px 0 0;
}

.journey-header h3 {
  font-size: 28px;
  margin: 0 0 10px;
  font-weight: 700;
}

.journey-header p {
  font-size: 16px;
  opacity: 0.9;
  margin: 0;
  line-height: 1.5;
}

.journey-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  padding: 40px;
}

@media (max-width: 768px) {
  .journey-content {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 30px 20px;
  }
  
  .journey-header {
    padding: 30px 20px 20px;
  }
  
  .journey-header h3 {
    font-size: 24px;
  }
}

/* ========== LEFT COLUMN - FORM ========== */
.journey-left {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.planner-preview {
  background: #f8f9fa;
  padding: 25px;
  border-radius: 12px;
  border: 1px solid #eaeaea;
}

.planner-preview h4 {
  margin: 0 0 15px;
  color: #222;
  font-size: 18px;
  font-weight: 600;
}

.planner-preview ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.planner-preview li {
  color: #444;
  font-size: 15px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.planner-preview li:before {
  content: "✓";
  color: #f26b1d;
  font-weight: bold;
  font-size: 16px;
}

/* Form Styles */
#journeyForm {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-row label {
  font-weight: 600;
  color: #333;
  font-size: 14px;
}

.form-row input,
.form-row select {
  padding: 14px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  font-size: 15px;
  transition: all 0.2s ease;
  background: white;
  font-family: inherit;
}

.form-row input:focus,
.form-row select:focus {
  outline: none;
  border-color: #f26b1d;
  box-shadow: 0 0 0 3px rgba(242, 107, 29, 0.1);
}

.form-row select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 16px;
  padding-right: 45px;
}

.form-actions {
  margin-top: 10px;
}

.generate-btn {
  width: 100%;
  padding: 16px;
  background: linear-gradient(135deg, #f26b1d 0%, #a12a20 100%);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.generate-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(242, 107, 29, 0.3);
}

.generate-btn:active {
  transform: translateY(0);
}

.generate-btn .btn-text {
  display: block;
}

.generate-btn .btn-loading {
  display: none;
  align-items: center;
  gap: 10px;
}

.generate-btn.loading .btn-text {
  display: none;
}

.generate-btn.loading .btn-loading {
  display: flex;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Form Messages */
.form-message {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  display: none;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.form-message.success {
  display: block;
  background: #e8f7ef;
  color: #0a6640;
  border: 1px solid #a8e6c3;
}

.form-message.error {
  display: block;
  background: #fee;
  color: #c53030;
  border: 1px solid #feb2b2;
}

.note {
  color: #666;
  font-size: 12px;
  text-align: center;
  line-height: 1.5;
  margin-top: 10px;
}

/* ========== RIGHT COLUMN - PREVIEW ========== */
.journey-right {
  display: flex;
  flex-direction: column;
  gap: 25px;
}

.planner-preview-box {
  background: white;
  padding: 25px;
  border-radius: 12px;
  border: 2px solid #f0f0f0;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.planner-preview-box h4 {
  text-align: center;
  margin: 0 0 20px;
  color: #222;
  font-size: 18px;
  font-weight: 600;
}

.preview-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.preview-item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  padding-bottom: 20px;
  border-bottom: 1px solid #f0f0f0;
}

.preview-item:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.preview-icon {
  font-size: 24px;
  width: 40px;
  height: 40px;
  background: rgba(242, 107, 29, 0.1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #f26b1d;
}

.preview-item div {
  flex: 1;
}

.preview-item strong {
  display: block;
  font-size: 15px;
  color: #333;
  margin-bottom: 5px;
  font-weight: 600;
}

.preview-item p {
  margin: 0;
  font-size: 13px;
  color: #666;
  line-height: 1.5;
}

.preview-note {
  text-align: center;
  font-size: 12px;
  color: #888;
  font-style: italic;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #f0f0f0;
}

/* ========== FLOATING BUTTON ========== */
.floating-planner-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: linear-gradient(135deg, #f26b1d 0%, #a12a20 100%);
  color: white;
  padding: 15px 25px;
  border-radius: 50px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 25px rgba(242, 107, 29, 0.4);
  cursor: pointer;
  z-index: 9998;
  transition: all 0.3s ease;
  border: none;
  font-weight: 600;
  font-size: 15px;
  font-family: inherit;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 8px 25px rgba(242, 107, 29, 0.4); }
  50% { box-shadow: 0 8px 35px rgba(242, 107, 29, 0.6); }
  100% { box-shadow: 0 8px 25px rgba(242, 107, 29, 0.4); }
}

.floating-planner-btn:hover {
  transform: translateY(-5px) scale(1.05);
  box-shadow: 0 12px 35px rgba(242, 107, 29, 0.5);
}

.floating-planner-btn svg {
  width: 20px;
  height: 20px;
}

@media (max-width: 768px) {
  .floating-planner-btn {
    bottom: 20px;
    right: 20px;
    padding: 12px 20px;
    font-size: 14px;
  }
  
  .floating-planner-btn span {
    display: none;
  }
  
  .floating-planner-btn {
    padding: 15px;
    border-radius: 50%;
    width: 56px;
    height: 56px;
    justify-content: center;
  }
}

/* ========== PDF CONTENT (HIDDEN) ========== */
#plannerContent {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 210mm;
  min-height: 297mm;
  background: white;
  padding: 20mm;
  font-family: 'Inter', sans-serif;
}

.pdf-header {
  text-align: center;
  margin-bottom: 30px;
  border-bottom: 3px solid #f26b1d;
  padding-bottom: 20px;
}

.pdf-header h1 {
  color: #f26b1d;
  margin: 0;
  font-size: 36px;
}

.pdf-section {
  margin-bottom: 30px;
  page-break-inside: avoid;
}

.pdf-section h2 {
  color: #a12a20;
  border-bottom: 2px solid #ffeae0;
  padding-bottom: 8px;
  margin-bottom: 20px;
  font-size: 24px;
}