/**
 * Feedback Modal Styles
 * @package    Com_Cuisine
 * @copyright  2025 Cuisine Compliance
 */

/* Modal Overlay */
.feedback-modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.6);
  animation: feedbackFadeIn 0.3s;
}

@keyframes feedbackFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Modal Content Box */
.feedback-modal-content {
  background-color: #fff;
  margin: 5% auto;
  padding: 0;
  border-radius: 8px;
  width: 90%;
  max-width: 600px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  animation: feedbackSlideIn 0.3s;
}

@keyframes feedbackSlideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Modal Header */
.feedback-modal-title {
  margin: 0;
  padding: 20px 30px;
  background-color: #03594c;
  color: #fff;
  border-radius: 8px 8px 0 0;
  font-size: 1.5rem;
}

/* Close Button */
.feedback-modal-close {
  color: #fff;
  float: right;
  font-size: 28px;
  font-weight: bold;
  line-height: 20px;
  cursor: pointer;
  transition: color 0.2s;
}

.feedback-modal-close:hover,
.feedback-modal-close:focus {
  color: #f8f7f2;
}

/* Form */
#feedbackForm {
  padding: 30px;
}

/* Form Groups */
.feedback-form-group {
  margin-bottom: 20px;
}

/* Logged-in User Info Display */
.feedback-user-info {
  margin-bottom: 20px;
  padding: 15px;
  background-color: #e8f5e9;
  border-left: 4px solid #03594c;
  border-radius: 4px;
}

.feedback-user-info p {
  margin: 0;
  color: #333;
  font-size: 0.95rem;
}

.feedback-user-info strong {
  color: #03594c;
}

.feedback-label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #333;
  font-size: 0.95rem;
}

.feedback-required {
  color: #dc3545;
}

/* Input Fields */
.feedback-input,
.feedback-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 1rem;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.feedback-input:focus,
.feedback-textarea:focus {
  outline: none;
  border-color: #03594c;
  box-shadow: 0 0 0 3px rgba(3, 89, 76, 0.1);
}

.feedback-textarea {
  resize: vertical;
  min-height: 100px;
}

/* Select Dropdown */
select.feedback-input {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath fill='%23333' d='M0 0l6 8 6-8z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 35px;
}

/* Hints */
.feedback-hint {
  display: block;
  margin-top: 5px;
  font-size: 0.85rem;
  color: #666;
}

/* File Input */
.feedback-file-input {
  padding: 8px 0;
}

.feedback-files-list {
  margin-top: 10px;
}

.feedback-file-items {
  list-style: none;
  padding: 0;
  margin: 0;
}

.feedback-file-items li {
  padding: 8px 12px;
  background-color: #f8f9fa;
  border-left: 3px solid #03594c;
  margin-bottom: 5px;
  font-size: 0.9rem;
}

/* Buttons */
.feedback-buttons {
  display: flex;
  gap: 10px;
  margin-top: 25px;
}

.feedback-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  flex: 1;
}

.feedback-btn-primary {
  background-color: #03594c;
  color: #fff;
}

.feedback-btn-primary:hover:not(:disabled) {
  background-color: #024739;
}

.feedback-btn-primary:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

.feedback-btn-secondary {
  background-color: #6c757d;
  color: #fff;
}

.feedback-btn-secondary:hover {
  background-color: #5a6268;
}

.feedback-btn-loading {
  display: inline-block;
}

/* Status Messages */
.feedback-status {
  margin-top: 20px;
  padding: 12px 16px;
  border-radius: 4px;
  font-size: 0.95rem;
}

.feedback-status-success {
  background-color: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
}

.feedback-status-error {
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
}

/* reCAPTCHA Disclosure */
.feedback-modal .recaptcha-disclosure {
  margin: 20px 0;
  padding: 0.75rem;
  font-size: 0.875rem;
  color: #666;
  background-color: #f8f9fa;
  border-left: 3px solid #03594c;
  border-radius: 4px;
}

.feedback-modal .recaptcha-disclosure a {
  color: #03594c;
  text-decoration: underline;
}

.feedback-modal .recaptcha-disclosure a:hover {
  color: #024739;
}

/* Trigger Buttons on Pages */
.feedback-trigger {
  display: inline-block;
  padding: 10px 20px;
  background-color: #03594c;
  color: #fff;
  text-decoration: none;
  border: none;
  border-radius: 4px;
  font-size: 0.95rem;
  cursor: pointer;
  transition: background-color 0.2s;
}

.feedback-trigger:hover {
  background-color: #024739;
  color: #fff;
  text-decoration: none;
}

.feedback-trigger-secondary {
  background-color: #6c757d;
}

.feedback-trigger-secondary:hover {
  background-color: #5a6268;
}

/* Feedback Bar (for state pages) */
.feedback-bar {
  margin-top: 40px;
  padding: 20px;
  background-color: #f8f9fa;
  border-top: 2px solid #03594c;
  text-align: center;
}

.feedback-bar p {
  margin: 0 0 15px 0;
  font-size: 1.1rem;
  color: #333;
}

/* Homepage Feedback Section */
.homepage-feedback {
  margin: 30px 0;
  text-align: center;
}

.homepage-feedback .feedback-trigger {
  margin: 0 10px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .feedback-modal-content {
    width: 95%;
    margin: 10% auto;
  }
  
  .feedback-modal-title {
    padding: 15px 20px;
    font-size: 1.25rem;
  }
  
  #feedbackForm {
    padding: 20px;
  }
  
  .feedback-buttons {
    flex-direction: column;
  }
  
  .feedback-btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .feedback-modal-content {
    margin: 5% auto;
  }
  
  .feedback-modal-title {
    font-size: 1.1rem;
    padding: 12px 15px;
  }
  
  #feedbackForm {
    padding: 15px;
  }
}
