/* 
 * Main CSS for KhEC Confessions Application
 */

:root {
  --primary-color: #3b5998;
  --primary-dark: #2d4373;
  --secondary-color: #8b9dc3;
  --accent-color: #dfe3ee;
  --light-bg: #f7f7f7;
  --dark-text: #333;
  --light-text: #fff;
  --error-color: #e74c3c;
  --success-color: #2ecc71;
  --warning-color: #f39c12;
  --border-radius: 8px;
  --box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  --transition: all 0.3s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--light-bg);
  color: var(--dark-text);
  line-height: 1.6;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
}

header {
  text-align: center;
  margin-bottom: 30px;
  padding: 20px 0;
  background-color: var(--primary-color);
  color: var(--light-text);
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
}

header h1 {
  font-size: 2.5rem;
  margin-bottom: 10px;
}

header p {
  font-size: 1.1rem;
  opacity: 0.9;
}

/* Modal Styles */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition);
}

.modal-overlay.show {
  opacity: 1;
  visibility: visible;
}

.modal {
  background-color: #fff;
  border-radius: var(--border-radius);
  width: 90%;
  max-width: 700px;
  max-height: 80vh;
  overflow-y: auto;
  padding: 30px;
  box-shadow: var(--box-shadow);
  transform: translateY(-20px);
  transition: var(--transition);
}

.modal-overlay.show .modal {
  transform: translateY(0);
}

.modal-header {
  border-bottom: 1px solid var(--accent-color);
  padding-bottom: 15px;
  margin-bottom: 20px;
}

.modal-header h2 {
  color: var(--primary-color);
  font-size: 1.8rem;
}

.modal-body {
  margin-bottom: 20px;
}

.modal-body p {
  margin-bottom: 15px;
  font-size: 1.05rem;
}

.modal-body ul {
  margin-left: 20px;
  margin-bottom: 20px;
}

.modal-body li {
  margin-bottom: 12px;
  line-height: 1.5;
  font-size: 1.05rem;
}

.modal-footer {
  text-align: center;
}

/* Form Styles */
.confession-form {
  background-color: #fff;
  padding: 30px;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  margin-bottom: 30px;
  display: none;
}

.confession-form.show {
  display: block;
}

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

label {
  display: block;
  margin-bottom: 12px;
  font-weight: 600;
  color: var(--primary-dark);
}

textarea {
  width: 100%;
  min-height: 150px;
  padding: 15px;
  border: 1px solid #ddd;
  border-radius: var(--border-radius);
  resize: vertical;
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
  background-color: #f9f9f9;
}

textarea:focus {
  border-color: var(--primary-color);
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 89, 152, 0.2);
  background-color: #fff;
}

/* Enhanced Radio Group Styling */
.posting-options {
  background-color: #f9f9f9;
  padding: 20px;
  border-radius: var(--border-radius);
  border: 1px solid #eee;
}

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 10px;
  margin-bottom: 15px;
}

/* Horizontal radio group */
.radio-group.horizontal {
  flex-direction: row;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 10px;
}

.radio-group.horizontal .radio-option {
  flex: 1;
  width: 50%;
}

.radio-option {
  display: flex;
  align-items: center;
}

.radio-option input[type="radio"] {
  display: none; /* Hide the radio button completely */
}

.option-label {
  display: flex;
  align-items: center;
  cursor: pointer;
  padding: 15px;
  border-radius: var(--border-radius);
  transition: var(--transition);
  width: 100%;
  border: 2px solid transparent;
}

.option-label:hover {
  background-color: #eef1f8;
}

.radio-option input[type="radio"]:checked + .option-label {
  background-color: var(--accent-color);
  border-color: var(--primary-color);
}

.option-icon {
  margin-right: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: rgba(59, 89, 152, 0.1);
  border-radius: 50%;
  color: var(--primary-color);
  flex-shrink: 0;
}

.option-icon svg {
  width: 22px;
  height: 22px;
  stroke: var(--primary-color);
}

.option-text {
  display: flex;
  flex-direction: column;
}

.option-text strong {
  font-size: 1.1rem;
  color: var(--primary-dark);
}

/* Schedule options styling */
.schedule-options {
  display: none;
  margin-top: 15px;
  padding-top: 15px;
  border-top: 1px dashed #ddd;
  animation: fadeIn 0.3s ease;
}

.schedule-options.show {
  display: block;
}

.datetime-picker {
  padding: 12px 15px;
  border: 1px solid #ddd;
  border-radius: var(--border-radius);
  width: 100%;
  font-family: inherit;
  margin-bottom: 12px;
  background-color: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.quick-options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}

.quick-options span {
  font-size: 0.9rem;
  color: #666;
  margin-right: 5px;
}

.quick-option {
  background-color: #fff;
  color: var(--primary-color);
  border: 1px solid var(--accent-color);
  border-radius: 20px;
  padding: 8px 15px;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.quick-option:hover {
  background-color: var(--accent-color);
  transform: translateY(-1px);
}

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

button {
  background-color: var(--primary-color);
  color: white;
  border: none;
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

button:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

button:active {
  transform: translateY(0);
  box-shadow: 0 2px 3px rgba(0, 0, 0, 0.1);
}

button:disabled {
  background-color: #cccccc;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-secondary {
  background-color: var(--secondary-color);
  color: var(--light-text);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.btn-secondary:hover {
  background-color: #7b8ab4;
}

/* Status Section */
.status-section {
  background-color: #fff;
  padding: 30px;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  margin-bottom: 30px;
  display: none;
}

.status-section.show {
  display: block;
  animation: slideUp 0.4s ease;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.status-header {
  margin-bottom: 20px;
  border-bottom: 1px solid var(--accent-color);
  padding-bottom: 10px;
}

.status-message {
  padding: 15px;
  margin-bottom: 15px;
  border-radius: var(--border-radius);
  font-weight: 600;
  text-align: center;
}

.status-info {
  background-color: #d1ecf1;
  border: 1px solid #bee5eb;
  color: #0c5460;
}

.status-success {
  background-color: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
}

.status-error {
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
}

.status-warning {
  background-color: #fff3cd;
  border: 1px solid #ffeeba;
  color: #856404;
}

.feedback-section {
  background-color: #f8f9fa;
  padding: 18px;
  border-radius: var(--border-radius);
  margin-top: 20px;
  border: 1px solid #eee;
}

.feedback-heading {
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--primary-dark);
}

/* Footer */
footer {
  text-align: center;
  margin-top: 40px;
  padding: 20px 0;
  border-top: 1px solid var(--accent-color);
  color: #777;
}

.admin-link {
  color: var(--primary-color);
  text-decoration: none;
  font-size: 0.9rem;
  margin-top: 10px;
  display: inline-block;
  opacity: 0.7;
  transition: var(--transition);
}

.admin-link:hover {
  opacity: 1;
  text-decoration: underline;
}

/* Feedback and Guidelines */
.feedback-box {
  margin-top: 20px;
  padding: 15px;
  border-radius: var(--border-radius);
  background-color: #f9f9f9;
  border-left: 5px solid var(--primary-color);
  line-height: 1.5;
  font-size: 0.95rem;
}

.feedback-error {
  border-left-color: var(--error-color);
  background-color: rgba(231, 76, 60, 0.1);
}

.feedback-warning {
  border-left-color: var(--warning-color);
  background-color: rgba(243, 156, 18, 0.1);
}

.feedback-info {
  background-color: #d1ecf1;
  border-left: 4px solid #17a2b8;
}

.feedback-success {
  background-color: #d4edda;
  border-left: 4px solid #28a745;
}

.feedback-box strong {
  font-size: 1.1rem;
  display: block;
  margin-bottom: 8px;
  color: var(--dark-text);
}

.rule-violation {
  color: var(--error-color);
  font-size: 1.15rem;
  display: block;
  margin-top: 10px;
  margin-bottom: 8px;
  border-left: 3px solid var(--error-color);
  padding-left: 10px;
  background-color: rgba(231, 76, 60, 0.05);
  padding: 8px 10px;
  border-radius: 4px;
}

.guidelines-reminder {
  margin-top: 20px;
  padding: 15px;
  border-radius: var(--border-radius);
  background-color: rgba(41, 128, 185, 0.1);
  border: 1px dashed rgba(41, 128, 185, 0.5);
}

.guidelines-reminder p {
  margin-bottom: 10px;
  font-weight: 600;
  color: #2980b9;
}

.guidelines-reminder ul {
  margin-left: 20px;
}

.guidelines-reminder li {
  margin-bottom: 5px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  header h1 {
    font-size: 2rem;
  }
  
  .container {
    padding: 15px;
  }
  
  .modal {
    padding: 20px;
    width: 95%;
  }
  
  .posting-options {
    padding: 15px;
  }
  
  .option-text strong {
    font-size: 1rem;
  }
  
  .option-description {
    font-size: 0.85rem;
  }
}

.btn-primary {
  background-color: var(--primary-color);
  color: white;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.btn-primary:hover {
  background-color: var(--primary-dark);
}

.center-button {
  display: block;
  margin: 0 auto;
  min-width: 200px;
}

.center-button-container {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

.personalized-reply {
  margin-top: 20px;
  font-style: italic;
  border-top: 1px dashed #28a745;
  border-bottom: 1px dashed #28a745;
  padding: 20px;
  background-color: #f8fff9;
  animation: fadeIn 0.5s ease;
  border-radius: 10px;
  box-shadow: 0 2px 15px rgba(40, 167, 69, 0.1);
  position: relative;
}

.personalized-reply:before {
  content: '"';
  position: absolute;
  left: 10px;
  top: 5px;
  font-size: 40px;
  color: rgba(40, 167, 69, 0.2);
  font-family: Georgia, serif;
}

.personalized-reply:after {
  content: '"';
  position: absolute;
  right: 10px;
  bottom: -15px;
  font-size: 40px;
  color: rgba(40, 167, 69, 0.2);
  font-family: Georgia, serif;
}

.personalized-reply strong {
  color: #28a745;
  font-size: 1.2rem;
  margin-bottom: 12px;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
} 