/* Basic Setup */
:root {
  --bg-color: #f6f8fb;
  --text-main: #333;
  --text-secondary: #666;
  --primary-blue: #155bc5;
  --primary-blue-hover: #124fa8;
  --danger-red: #d32f2f;
  --success-green: #2e7d32;
  --warning-yellow: #ed6c02;
  --modal-bg: #fff;
  --border-radius: 8px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

body {
  font-family: "Inter", sans-serif;
  background-color: var(--bg-color);
  color: var(--text-main);
  margin: 0;
  padding: 0;
  display: flex;
  overflow-x: hidden;
  flex-direction: column;
  min-height: 100vh;
}

/* Header */
.refund-header {
  background: #155bc5;
  color: #fff;
  padding: 15px 5%;
  display: flex;
  align-items: center;
  gap: 15px;
}

.refund-header i {
  font-size: 24px;
}

.header-text h1 {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0;
}

.header-text p {
  font-size: 0.8rem;
  opacity: 0.8;
  margin: 0;
}

/* Main Container */
.main-container {
  padding: 40px 5%;
  max-width: 800px; /* Limits form width */
  margin: 0 auto;
  box-sizing: border-box;
  width: 100%;
  flex: 1;
}

/* Modal Overlay */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2000;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s;
}

.modal-overlay.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.refund-modal {
  background: var(--modal-bg);
  padding: 30px;
  border-radius: var(--border-radius);
  width: 90%;
  max-width: 700px;
  box-shadow: var(--shadow);
  position: relative;
  box-sizing: border-box;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: #999;
}

.modal-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}

.modal-title-row i {
  color: var(--warning-yellow);
  font-size: 1.5rem;
}

.modal-title-row h2 {
  font-size: 1.3rem;
  margin: 0;
  font-weight: 700;
}

/* Alert Boxes */
.alert-box {
  padding: 15px;
  border-radius: 6px;
  margin-bottom: 15px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.95rem;
  line-height: 1.5;
}

.alert-green {
  background-color: #edf7ed;
  color: #1e4620;
}

.alert-red {
  background-color: #fdeded;
  color: #5f2120;
}

.alert-yellow {
  background-color: #fff4e5;
  color: #663c00;
}

.alert-icon {
  margin-top: 2px;
}

.list-red i {
  color: var(--danger-red);
  margin-right: 5px;
}

.important-list {
  border-left: 4px solid var(--warning-yellow);
  padding-left: 15px;
  margin: 20px 0;
}

.important-list h4 {
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #333;
}

.important-list ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.important-list li {
  margin-bottom: 5px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #555;
}

.modal-actions {
  display: flex;
  justify-content: space-between;
  gap: 15px;
  margin-top: 30px;
}

.btn-modal-cancel {
  flex: 1;
  padding: 12px;
  border: 1px solid #ddd;
  background: #fff;
  border-radius: 6px;
  color: #333;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-modal-confirm {
  flex: 1;
  padding: 12px;
  background: var(--primary-blue);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-modal-confirm:hover {
  background: var(--primary-blue-hover);
}

/* Form Styling */
.refund-form-card {
  background: #fff;
  padding: 40px;
  box-sizing: border-box;
  border-radius: var(--border-radius);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05); /* Subtle shadow like screenshot */
}

.form-header {
  margin-bottom: 30px;
}

.form-header h2 {
  color: var(--primary-blue);
  margin-bottom: 10px;
}

.form-header p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  font-size: 0.9rem;
  color: #333;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color 0.2s;
  background: #f9f9f9;
  box-sizing: border-box;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--primary-blue);
  outline: none;
  background: #fff;
}

.form-row {
  display: flex;
  gap: 20px;
}

.form-col {
  flex: 1;
}

.file-upload-box {
  background: #f2f2f2;
  border: 1px dashed #ccc;
  padding: 15px;
  text-align: center;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  color: #666;
  position: relative;
}

.file-upload-box input[type="file"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 6px;
  border: 1px solid #eee;
  font-size: 0.85rem;
  color: #555;
  margin-top: 20px;
}

.btn-submit {
  width: 100%;
  padding: 15px;
  background: var(--primary-blue);
  color: #fff;
  border: none;
  font-size: 1.1rem;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
  margin-top: 30px;
  transition: background 0.2s;
}

.btn-submit:hover {
  background: var(--primary-blue-hover);
}

.form-footer {
  text-align: center;
  margin-top: 40px;
  font-size: 0.8rem;
  color: #999;
}

/* Success Screen */
.success-screen {
  display: none;
  text-align: center;
  padding: 60px 20px;
  max-width: 600px;
  margin: 0 auto;
}

.success-screen.active {
  display: block;
}

.success-icon {
  font-size: 4rem;
  color: var(--success-green);
  margin-bottom: 20px;
}

.success-screen h2 {
  color: var(--primary-blue);
  margin-bottom: 15px;
}

.success-screen p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 10px;
}

/* Error Messages */
.error-message {
  display: block;
  color: var(--danger-red);
  font-size: 0.85rem;
  margin-top: 5px;
  min-height: 0;
  transition: all 0.2s;
}

.error-message:not(:empty) {
  margin-top: 5px;
}

.form-input.error,
.form-select.error,
.form-textarea.error {
  border-color: var(--danger-red);
  background: #fff5f5;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .refund-header {
    padding: 12px 4%;
  }

  .header-text h1 {
    font-size: 1rem;
  }

  .header-text p {
    font-size: 0.75rem;
  }

  .main-container {
    padding: 20px 4%;
  }

  .refund-modal {
    padding: 20px;
    width: 95%;
    max-height: 85vh;
  }

  .modal-title-row h2 {
    font-size: 1.1rem;
  }

  .alert-box {
    font-size: 0.85rem;
    padding: 12px;
  }

  .modal-actions {
    flex-direction: column;
  }

  .btn-modal-cancel,
  .btn-modal-confirm {
    width: 100%;
  }

  .refund-form-card {
    padding: 25px 20px;
  }

  .form-header h2 {
    font-size: 1.3rem;
  }

  .form-row {
    flex-direction: column;
    gap: 0;
  }

  .form-input,
  .form-select,
  .form-textarea {
    font-size: 16px; /* Prevents zoom on iOS */
  }

  .btn-submit {
    font-size: 1rem;
  }

  .success-screen p a.btn-submit {
    width: 100%;
    max-width: 300px;
    font-size: 0.95rem;
    padding: 12px 20px;
  }
}
