﻿/* Common Styles */
.input-container {
  margin-bottom: 1rem;
  width: 100%;
}

.input-label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.5rem;
}

.input-field {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
  font-size: 0.875rem;
  line-height: 1.25rem;
  color: #111827;
  background-color: #fff;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

  .input-field:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
  }

.input-error {
  border-color: #ef4444;
}

  .input-error:focus {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
  }

.error-message {
  display: block;
  color: #ef4444;
  font-size: 0.75rem;
  margin-top: 0.25rem;
}

/* Numeric Input Specific */
.numeric-input {
  -moz-appearance: textfield;
}

  .numeric-input::-webkit-inner-spin-button,
  .numeric-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
  }

/* Rich Text Editor Specific */
.rich-text-container {
  border: 1px solid #d1d5db;
  border-radius: 0.375rem;
}

.cke_chrome {
  border: none !important;
  border-radius: 0.375rem !important;
}

.cke_top {
  border-top-left-radius: 0.375rem !important;
  border-top-right-radius: 0.375rem !important;
  background: #f9fafb !important;
  border-bottom: 1px solid #e5e7eb !important;
}

.cke_bottom {
  border-bottom-left-radius: 0.375rem !important;
  border-bottom-right-radius: 0.375rem !important;
  background: #f9fafb !important;
  border-top: 1px solid #e5e7eb !important;
}

/* Persian Date Input Specific */
.date-input {
  background-color: #fff !important;
  cursor: pointer !important;
}

/* Custom styles for persian datepicker */
.datepicker-plot-area {
  font-family: inherit;
  border-radius: 0.375rem;
  box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

  .datepicker-plot-area .datepicker-day-view .table-days td span {
    border-radius: 0.375rem;
  }

    .datepicker-plot-area .datepicker-day-view .table-days td span:hover {
      background-color: #4f46e5;
      color: #fff;
    }

  .datepicker-plot-area .datepicker-day-view .table-days td.selected span {
    background-color: #4f46e5 !important;
    color: #fff;
  }

/* Custom CSS for the combo box */
.select2-container--bootstrap4 .select2-selection {
  height: calc(1.5em + 0.75rem + 2px);
  padding: 0.375rem 0.75rem;
}

.input-error + .select2-container--bootstrap4 .select2-selection {
  border-color: #dc3545;
}

.error-message {
  color: #dc3545;
  font-size: 80%;
  margin-top: 0.25rem;
}

.input-container {
  margin-bottom: 1rem;
}

.input-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: bold;
}

.image-input {
  display: none; /* Hide the default file input */
}

.image-preview-container {
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 5px;
  display: inline-block;
  max-width: 100%;
  max-height: 300px; /* Limit height for preview */
  overflow: hidden;
}

.image-preview {
  max-width: 100%;
  max-height: 100%;
  display: block;
  margin: 0 auto;
}