/* Contact Form Widget Styles */
.contact-form-widget {
  max-width: 100%;
  margin: 0 auto;
}
.contact-form-widget .form-title {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 20px;
  color: #333;
  text-align: center;
}
.contact-form-widget .form-description {
  font-size: 16px;
  color: #666;
  margin-bottom: 30px;
  text-align: center;
  line-height: 1.6;
}
.contact-form-widget .contact-form {
  background: #fff;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}
.contact-form-widget .form-row {
  display: flex;
  flex-wrap: wrap;
  margin-bottom: 20px;
  gap: 20px;
}
.contact-form-widget .form-field {
  flex: 1;
  min-width: 0;
}
.contact-form-widget .form-field.width-full {
  flex-basis: 100%;
}
.contact-form-widget .form-field.width-half {
  flex-basis: calc(50% - 10px);
}
.contact-form-widget .form-field.width-third {
  flex-basis: calc(33.333% - 14px);
}
.contact-form-widget .form-field.width-two-thirds {
  flex-basis: calc(66.666% - 6px);
}
.contact-form-widget .form-field label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: #333;
  font-size: 14px;
}
.contact-form-widget .form-field label.required::after {
  content: " *";
  color: #e74c3c;
}
.contact-form-widget .form-field input,
.contact-form-widget .form-field textarea,
.contact-form-widget .form-field select {
  width: 100%;
  padding: 12px 15px;
  border: 2px solid #e1e1e1;
  border-radius: 5px;
  font-size: 14px;
  transition: border-color 0.3s ease;
  box-sizing: border-box;
}
.contact-form-widget .form-field input:focus,
.contact-form-widget .form-field textarea:focus,
.contact-form-widget .form-field select:focus {
  outline: none;
  border-color: #3498db;
}
.contact-form-widget .form-field textarea {
  resize: vertical;
  min-height: 120px;
}
.contact-form-widget .form-field input[type="file"] {
  padding: 8px;
  border: 2px dashed #e1e1e1;
  background: #f9f9f9;
}
.contact-form-widget .form-field.radio-group,
.contact-form-widget .form-field.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.contact-form-widget .form-field.radio-group .option,
.contact-form-widget .form-field.checkbox-group .option {
  display: flex;
  align-items: center;
  gap: 8px;
}
.contact-form-widget .form-field.radio-group input,
.contact-form-widget .form-field.checkbox-group input {
  width: auto;
  margin: 0;
}
.contact-form-widget .submit-btn {
  background: #3498db;
  color: white;
  padding: 15px 30px;
  border: none;
  border-radius: 5px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.3s ease;
  width: 100%;
  margin-top: 20px;
}
.contact-form-widget .submit-btn:hover {
  background: #2980b9;
}
.contact-form-widget .submit-btn:disabled {
  background: #bdc3c7;
  cursor: not-allowed;
}
.contact-form-widget .success-message,
.contact-form-widget .error-message {
  display: none; /* Hidden by default */
  padding: 15px;
  border-radius: 5px;
  font-weight: 600;
  margin-top: 20px; /* Apply margin here */
}
.contact-form-widget .success-message.success {
  display: block; /* Show when success class is added */
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}
.contact-form-widget .error-message.error {
  display: block; /* Show when error class is added */
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}
/* Admin Styles */
.contact-forms-admin {
  background: #f1f1f1;
  min-height: 100vh;
  padding: 20px;
}
.contact-summary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}
.summary-card {
  background: #fff;
  border: 1px solid #e1e1e1;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.summary-card h3 {
  margin: 0 0 10px 0;
  font-size: 14px;
  color: #666;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.summary-number {
  font-size: 36px;
  font-weight: 600;
  color: #3498db;
  line-height: 1;
}
.summary-number.pending-color {
  color: #f39c12;
}
.summary-number.resolved-color {
  color: #27ae60;
}
.export-section {
  margin-bottom: 20px;
}
.export-section .button {
  margin-right: 10px;
}
.contact-table-container {
  background: #fff;
  border: 1px solid #e1e1e1;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.contact-forms-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
}
.contact-forms-table th,
.contact-forms-table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #f1f1f1;
}
.contact-forms-table th {
  background: #f8f9fa;
  font-weight: 600;
  color: #555;
  font-size: 13px;
  border-bottom: 1px solid #e1e1e1;
}
.contact-forms-table tbody tr:hover {
  background: #f8f9fa;
}
.contact-forms-table .column-checkbox {
  width: 40px;
  text-align: center;
}
.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.status-pending {
  background: #fff3cd;
  color: #856404;
}
.status-in-progress {
  background: #cce5ff;
  color: #004085;
}
.status-resolved {
  background: #d4edda;
  color: #155724;
}
.status-closed {
  background: #e2e3e5;
  color: #383d41;
}
/* Modal Styles */
.contact-modal {
  position: fixed;
  z-index: 100000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
}
.contact-modal-content {
  background-color: #fff;
  margin: 5% auto;
  padding: 30px;
  border-radius: 8px;
  width: 80%;
  max-width: 700px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}
.contact-modal-close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  line-height: 1;
}
.contact-modal-close:hover {
  color: #333;
}
/* Admin Styles */
.contact-forms-admin {
  background: #f1f1f1;
  min-height: 100vh;
  padding: 20px;
}
.contact-summary-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}
.summary-card {
  background: #fff;
  border: 1px solid #e1e1e1;
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.summary-card h3 {
  margin: 0 0 10px 0;
  font-size: 14px;
  color: #666;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.summary-number {
  font-size: 36px;
  font-weight: 600;
  color: #3498db;
  line-height: 1;
}
.summary-number.pending-color {
  color: #f39c12;
}
.summary-number.resolved-color {
  color: #27ae60;
}
.export-section {
  margin-bottom: 20px;
}
.export-section .button {
  margin-right: 10px;
}
.contact-table-container {
  background: #fff;
  border: 1px solid #e1e1e1;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}
.contact-forms-table {
  width: 100%;
  border-collapse: collapse;
  margin: 0;
}
.contact-forms-table th,
.contact-forms-table td {
  padding: 12px 15px;
  text-align: left;
  border-bottom: 1px solid #f1f1f1;
}
.contact-forms-table th {
  background: #f8f9fa;
  font-weight: 600;
  color: #555;
  font-size: 13px;
  border-bottom: 1px solid #e1e1e1;
}
.contact-forms-table tbody tr:hover {
  background: #f8f9fa;
}
.contact-forms-table .column-checkbox {
  width: 40px;
  text-align: center;
}
.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.status-pending {
  background: #fff3cd;
  color: #856404;
}
.status-in-progress {
  background: #cce5ff;
  color: #004085;
}
.status-resolved {
  background: #d4edda;
  color: #155724;
}
.status-closed {
  background: #e2e3e5;
  color: #383d41;
}
/* Modal Styles - Adjusted to match screenshot */
.contact-modal-overlay {
  position: fixed;
  z-index: 100000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  display: flex; /* Use flexbox for centering */
  justify-content: center;
  align-items: center;
}
.contact-modal {
  background-color: #fff;
  padding: 20px; /* Adjusted padding */
  border-radius: 8px;
  width: 90%; /* Adjusted width */
  max-width: 700px;
  max-height: 90vh; /* Adjusted max-height */
  overflow-y: auto;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  position: relative; /* For positioning the close button */
}
.contact-modal-close {
  color: #aaa;
  position: absolute; /* Position absolutely */
  top: 10px; /* Adjusted position */
  right: 15px; /* Adjusted position */
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
  line-height: 1;
}
.contact-modal-close:hover {
  color: #333;
}
/* Modal Content Styling */
.contact-modal-content h2 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 20px;
  color: #333;
}
.contact-detail-section {
  margin-bottom: 25px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eee;
}
.contact-detail-section:last-child {
  border-bottom: none;
}
.contact-detail-section h3 {
  margin-top: 0;
  font-size: 18px; /* Adjusted font size */
  font-weight: 600; /* Adjusted font weight */
  color: #333;
  margin-bottom: 15px; /* Added margin */
}
.contact-detail-section p {
  margin-bottom: 8px; /* Spacing between paragraphs */
  line-height: 1.5;
  font-size: 15px; /* Adjusted font size */
  color: #555;
}
.contact-detail-section p strong {
  color: #333; /* Ensure bold text is dark */
}
.status-update-form {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.status-update-form select {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}
.status-update-form .button-primary {
  padding: 8px 15px;
  font-size: 14px;
  line-height: 1.5;
}
.status-update-message {
  font-weight: bold;
  margin-left: 10px;
}
.status-note {
  font-size: 13px;
  color: #777;
  margin-top: 10px;
  margin-bottom: 0;
}
/* Responsive Design */
@media (max-width: 768px) {
  .contact-forms-table {
    font-size: 12px;
  }
  .contact-forms-table th,
  .contact-forms-table td {
    padding: 8px 10px;
  }
  .contact-modal {
    width: 95%;
    margin: 2% auto;
    padding: 20px;
  }
  .status-update-form {
    flex-direction: column;
    align-items: stretch;
  }
}
/* Loading States */
.loading {
  opacity: 0.6;
  pointer-events: none;
}
/* Notice Styles */
.notice {
  background: #fff;
  border-left: 4px solid #00a0d2;
  box-shadow: 0 1px 1px 0 rgba(0, 0, 0, 0.1);
  margin: 5px 0 15px;
  padding: 1px 12px;
}
.notice-success {
  border-left-color: #46b450;
}
.notice-error {
  border-left-color: #dc3232;
}
.notice p {
  margin: 0.5em 0;
  padding: 2px;
}
