/* Custom Plugin Frontend Styles */

.custom-plugin-form {
  max-width: 500px;
  margin: 20px 0;
  padding: 20px;
  border: 1px solid #ddd;
  border-radius: 5px;
  background: #f9f9f9;
}

.custom-plugin-form h3 {
  margin-top: 0;
  color: #333;
  border-bottom: 2px solid #0073aa;
  padding-bottom: 10px;
}

.custom-plugin-form p {
  margin-bottom: 15px;
}

.custom-plugin-form label {
  display: block;
  margin-bottom: 5px;
  font-weight: bold;
  color: #555;
}

.custom-plugin-form input[type="text"],
.custom-plugin-form input[type="email"],
.custom-plugin-form textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 3px;
  font-size: 14px;
  font-family: inherit;
  box-sizing: border-box;
}

.custom-plugin-form input[type="text"]:focus,
.custom-plugin-form input[type="email"]:focus,
.custom-plugin-form textarea:focus {
  border-color: #0073aa;
  outline: none;
  box-shadow: 0 0 5px rgba(0, 115, 170, 0.3);
}

.custom-plugin-form button {
  background: #0073aa;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 3px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.3s ease;
}

.custom-plugin-form button:hover {
  background: #005177;
}

.custom-plugin-form button:disabled {
  background: #ccc;
  cursor: not-allowed;
}

/* Response messages */
#custom-plugin-response {
  margin-top: 15px;
  padding: 10px;
  border-radius: 3px;
  display: none;
}

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

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

/* Custom message styles */
.custom-plugin-message {
  padding: 15px;
  margin: 20px 0;
  border-left: 4px solid #0073aa;
  background: #f0f8ff;
  border-radius: 0 3px 3px 0;
}

.custom-plugin-message-default {
  border-left-color: #0073aa;
  background: #f0f8ff;
}

.custom-plugin-message-success {
  border-left-color: #28a745;
  background: #d4edda;
  color: #155724;
}

.custom-plugin-message-warning {
  border-left-color: #ffc107;
  background: #fff3cd;
  color: #856404;
}

.custom-plugin-message-error {
  border-left-color: #dc3545;
  background: #f8d7da;
  color: #721c24;
}

/* Data display table */
.custom-plugin-data {
  margin: 20px 0;
}

.custom-plugin-data h3 {
  margin-bottom: 15px;
  color: #333;
}

.custom-plugin-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}

.custom-plugin-table th,
.custom-plugin-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #ddd;
}

.custom-plugin-table th {
  background: #f8f9fa;
  font-weight: bold;
  color: #555;
}

.custom-plugin-table tr:hover {
  background: #f5f5f5;
}

/* Responsive design */
@media (max-width: 768px) {
  .custom-plugin-form {
    padding: 15px;
    margin: 15px 0;
  }

  .custom-plugin-table {
    font-size: 14px;
  }

  .custom-plugin-table th,
  .custom-plugin-table td {
    padding: 8px;
  }
}

@media (max-width: 480px) {
  .custom-plugin-table,
  .custom-plugin-table thead,
  .custom-plugin-table tbody,
  .custom-plugin-table th,
  .custom-plugin-table td,
  .custom-plugin-table tr {
    display: block;
  }

  .custom-plugin-table thead tr {
    position: absolute;
    top: -9999px;
    left: -9999px;
  }

  .custom-plugin-table tr {
    border: 1px solid #ccc;
    margin-bottom: 10px;
    padding: 10px;
  }

  .custom-plugin-table td {
    border: none;
    border-bottom: 1px solid #eee;
    position: relative;
    padding-left: 50%;
  }

  .custom-plugin-table td:before {
    content: attr(data-label) ": ";
    position: absolute;
    left: 6px;
    width: 45%;
    padding-right: 10px;
    white-space: nowrap;
    font-weight: bold;
  }
}

/* Scrollable submenu */
.fl-menu .sub-menu {
    max-height: 50vh;
    overflow-y: auto;
    overflow-x: hidden;
}

.fl-menu .sub-menu {
    scrollbar-width: thin;
    scrollbar-color: #aaa transparent;
}

.fl-menu .sub-menu::-webkit-scrollbar {
    width: 6px;
}

.fl-menu .sub-menu::-webkit-scrollbar-thumb {
    background-color: rgba(0,0,0,.3);
    border-radius: 4px;
}

/* Related posts */
img.mp-related-thumb{
  width: 100%;
  height: 150px !important;
  object-fit: cover;
}

.mp-related-item{
  padding-bottom: 20px;
}

.mp-related-title{
  font-family: 'Segoe UI';
  font-size: 14px;
  color: #343a40;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Print button */
.mp-print-btn{
  background-color: var(--fl-global-primary);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 50px;
  cursor: pointer;
  font-size: 14px;
  transition: background-color 0.3s ease;
  margin-bottom: 20px;
}

@media print {

  body * {
    display: none !important;
  }

  .print-area,
  .print-area * {
    display: block !important;
    visibility: visible !important;
  }

  .print-area .mp-print-btn{
    background-color: var(--fl-global-primary);
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
    margin-bottom: 20px;
  }

}

.print-area .fl-module-rich-text p{
      overflow-wrap: anywhere;
}