/* 
 * Just Visit Plus - Registration Form Styles
 * Modern and attractive UI/UX design
 */

:root {
  --primary-color: #4e73df;
  --primary-dark: #2e59d9;
  --secondary-color: #1cc88a;
  --dark-color: #5a5c69;
  --light-color: #f8f9fc;
  --danger-color: #e74a3b;
  --warning-color: #f6c23e;
  --card-border-radius: 0.75rem;
  --input-border-radius: 0.5rem;
  --box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
  --transition: all 0.3s ease-in-out;
}

body {
  font-family: 'Nunito', 'Segoe UI', Roboto, Arial, sans-serif;
  background-color: #f4f7fc;
  color: #444;
}

/* Header Styling */
.site-header {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  padding: 1.5rem 0;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.site-header .navbar-brand {
  font-weight: 800;
  font-size: 1.75rem;
  color: white;
}

.site-header .nav-link {
  color: rgba(255, 255, 255, 0.8);
  font-weight: 600;
  padding: 0.5rem 1rem;
  transition: var(--transition);
}

.site-header .nav-link:hover {
  color: white;
  transform: translateY(-2px);
}

.site-header .btn-outline-light {
  border-width: 2px;
  font-weight: 600;
}

/* Main Content Area */
.main-content {
  padding: 3rem 0;
}

/* Card Styling */
.registration-card {
  border: none;
  border-radius: var(--card-border-radius);
  box-shadow: var(--box-shadow);
  overflow: hidden;
  margin-bottom: 2rem;
}

.registration-card .card-header {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: white;
  border: none;
  padding: 1.25rem 1.5rem;
}

.registration-card .card-header h3 {
  font-weight: 700;
  margin-bottom: 0;
  font-size: 1.5rem;
}

.registration-card .card-header h4 {
  font-weight: 600;
  margin-bottom: 0;
  font-size: 1.25rem;
}

.registration-card .card-body {
  padding: 1.75rem;
}

/* Section Cards */
.section-card {
  border: none;
  border-radius: var(--card-border-radius);
  box-shadow: 0 0.1rem 0.75rem rgba(0, 0, 0, 0.05);
  margin-bottom: 1.5rem;
  transition: var(--transition);
}

.section-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.1);
}

.section-card .card-header {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: white;
  border: none;
  padding: 1rem 1.5rem;
  border-radius: var(--card-border-radius) var(--card-border-radius) 0 0;
}

.section-card .card-body {
  padding: 1.5rem;
}

/* Form Controls */
.form-label {
  font-weight: 600;
  color: var(--dark-color);
  margin-bottom: 0.5rem;
}

.form-control, .form-select {
  border-radius: var(--input-border-radius);
  padding: 0.75rem 1rem;
  border: 1px solid #e3e6f0;
  font-size: 0.9rem;
  transition: var(--transition);
}

.form-control:focus, .form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.25rem rgba(78, 115, 223, 0.25);
}

.form-control:disabled {
  background-color: #f8f9fc;
  cursor: not-allowed;
}

/* File Upload Styling */
.file-upload-wrapper {
  position: relative;
  margin-bottom: 1rem;
}

.file-upload-input {
  position: relative;
  z-index: 2;
  width: 100%;
  height: calc(3rem + 2px);
  margin: 0;
  opacity: 0;
}

.file-upload-label {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  z-index: 1;
  height: calc(3rem + 2px);
  padding: 0.75rem 1rem;
  font-weight: 400;
  line-height: 1.5;
  color: #6e707e;
  background-color: #fff;
  border: 1px solid #e3e6f0;
  border-radius: var(--input-border-radius);
  display: flex;
  align-items: center;
}

.file-upload-label::after {
  content: "Browse";
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  bottom: 0.5rem;
  z-index: 3;
  display: block;
  padding: 0.375rem 0.75rem;
  line-height: 1.5;
  color: #fff;
  background-color: var(--primary-color);
  border-radius: 0.25rem;
  display: flex;
  align-items: center;
}

.file-upload-wrapper .file-upload-input:focus ~ .file-upload-label {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.25rem rgba(78, 115, 223, 0.25);
}

/* Buttons */
.btn {
  border-radius: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-weight: 600;
  transition: var(--transition);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  border: none;
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
  transform: translateY(-2px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.btn-outline-secondary {
  border-color: #d1d3e2;
  color: var(--dark-color);
}

.btn-outline-secondary:hover {
  background-color: #eaecf4;
  color: var(--dark-color);
}

/* Address Auto-fill Button */
.address-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  border-radius: 0.35rem;
}

.address-copy-btn i {
  font-size: 1rem;
}

/* Required Field Indicator */
.required-field {
  color: var(--danger-color);
  font-weight: bold;
  margin-left: 0.25rem;
}

/* Submit Button */
.submit-btn {
  padding: 1rem 2rem;
  font-size: 1.1rem;
  letter-spacing: 0.5px;
}

/* Alerts */
.alert {
  border-radius: var(--card-border-radius);
  border: none;
  padding: 1rem 1.5rem;
}

.alert-success {
  background-color: rgba(28, 200, 138, 0.15);
  color: #0f6848;
  border-left: 4px solid var(--secondary-color);
}

.alert-danger {
  background-color: rgba(231, 74, 59, 0.15);
  color: #a52a21;
  border-left: 4px solid var(--danger-color);
}

/* Footer */
.site-footer {
  background-color: #2c3e50;
  color: rgba(255, 255, 255, 0.8);
  padding: 2rem 0;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.8);
  transition: var(--transition);
}

.site-footer a:hover {
  color: white;
  text-decoration: none;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  gap: 1.5rem;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .registration-card .card-header h3 {
    font-size: 1.25rem;
  }
  
  .section-card .card-header h4 {
    font-size: 1.1rem;
  }
  
  .form-control, .form-select {
    padding: 0.6rem 0.75rem;
  }
  
  .btn {
    padding: 0.6rem 1.25rem;
  }
}

/* Animation for Loading */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.spinner-border {
  animation: spin 1s linear infinite;
}

/* Progress Steps */
.registration-steps {
  display: flex;
  justify-content: space-between;
  margin-bottom: 2rem;
  position: relative;
}

.registration-steps::before {
  content: '';
  position: absolute;
  top: 1.5rem;
  left: 0;
  right: 0;
  height: 2px;
  background: #e3e6f0;
  z-index: 1;
}

.step {
  position: relative;
  z-index: 2;
  background: #fff;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  border: 2px solid #e3e6f0;
  transition: var(--transition);
}

.step.active {
  border-color: var(--primary-color);
  background-color: var(--primary-color);
  color: white;
}

.step.completed {
  border-color: var(--secondary-color);
  background-color: var(--secondary-color);
  color: white;
}

.step-label {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}

/* Custom File Input Styling */
.custom-file-input::-webkit-file-upload-button {
  visibility: hidden;
}

.custom-file-input::before {
  content: 'Select file';
  display: inline-block;
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: white;
  border-radius: 0.25rem;
  padding: 0.375rem 0.75rem;
  outline: none;
  white-space: nowrap;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.9rem;
  margin-right: 1rem;
}

/* Image Preview Styling */
.image-preview {
  width: 100%;
  height: 150px;
  border: 1px solid #e3e6f0;
  border-radius: var(--input-border-radius);
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: #f8f9fc;
}

.image-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.image-preview-placeholder {
  color: #6e707e;
  font-size: 0.9rem;
  text-align: center;
  padding: 1rem;
}

.custom-file-input:hover::before {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
}

/* Image Preview */
.image-preview {
  width: 100%;
  height: 150px;
  border: 1px dashed #d1d3e2;
  border-radius: var(--input-border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.5rem;
  overflow: hidden;
  background-color: #f8f9fc;
}

.image-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.image-preview-placeholder {
  color: #b7b9cc;
  font-size: 0.9rem;
}
