/* =============================================
   Feedback Widget - Floating Button & Modal
   ============================================= */

/* Base font — match site's global font */
.feedback-floating-btn,
.feedback-modal-panel,
.feedback-admin-grid,
.feedback-admin-filters {
    font-family: "Open Sans", sans-serif;
}

/* Floating Button */
.feedback-floating-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background-color: #427FB7;
    color: #fff;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    z-index: 9999999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

.feedback-floating-btn:hover {
    background-color: #36699a;
    transform: scale(1.05);
}

.feedback-floating-btn:active {
    transform: scale(0.97);
}

.feedback-floating-btn svg {
    width: 24px;
    height: 24px;
    fill: #fff;
}

/* Modal Overlay */
.feedback-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 99999999;
}

/* Modal Panel */
.feedback-modal-panel {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 380px;
    max-height: 480px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    z-index: 999999999;
    display: none;
    flex-direction: column;
    overflow: hidden;
}

/* Modal Header */
.feedback-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background-color: #427FB7;
    color: #fff;
}

.feedback-modal-header h5 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.feedback-close-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.feedback-close-btn:hover {
    opacity: 1;
}

/* Modal Body */
.feedback-modal-body {
    padding: 20px;
    flex: 1;
    overflow-y: auto;
}

.feedback-modal-body label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}

.feedback-modal-body select,
.feedback-modal-body textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.feedback-modal-body select:focus,
.feedback-modal-body textarea:focus {
    outline: none;
    border-color: #427FB7;
}

.feedback-modal-body select {
    margin-bottom: 16px;
    appearance: auto;
}

.feedback-modal-body textarea {
    min-height: 120px;
    resize: vertical;
    margin-bottom: 4px;
}

.feedback-char-count {
    text-align: right;
    font-size: 12px;
    color: #999;
    margin-bottom: 8px;
}

.feedback-char-count.near-limit {
    color: #dc3545;
}

/* Modal Footer */
.feedback-modal-footer {
    padding: 12px 20px 16px;
    display: flex;
    justify-content: flex-end;
}

.feedback-submit-btn {
    background-color: #427FB7;
    color: #fff;
    border: none;
    padding: 10px 28px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.feedback-submit-btn:hover {
    background-color: #36699a;
}

.feedback-submit-btn:disabled {
    background-color: #6c757d;
    cursor: not-allowed;
}

/* Success/Error Message */
.feedback-message {
    text-align: center;
    padding: 30px 20px;
}

.feedback-message.success {
    color: #198754;
}

.feedback-message.error {
    color: #dc3545;
}

.feedback-message svg {
    width: 48px;
    height: 48px;
    margin-bottom: 12px;
}

.feedback-message p {
    font-size: 15px;
    font-weight: 500;
    margin: 0;
}

/* Validation Error */
.feedback-field-error {
    border-color: #dc3545 !important;
}

/* =============================================
   Feedback Admin Panel (Site Settings)
   ============================================= */

.feedback-admin-grid {
    width: 100%;
    overflow-x: auto;
}

.feedback-admin-grid table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.feedback-admin-grid table th {
    background-color: #f8f9fa;
    padding: 10px 12px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
    white-space: nowrap;
}

.feedback-admin-grid table td {
    padding: 10px 12px;
    border-bottom: 1px solid #dee2e6;
    vertical-align: top;
}

.feedback-admin-grid table tr:hover {
    background-color: #f8f9fa;
}

.feedback-admin-filters {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    align-items: center;
}

.feedback-admin-filters select,
.feedback-admin-filters input {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
}

.feedback-category-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.feedback-category-badge.suggestion {
    background-color: #d1ecf1;
    color: #0c5460;
}

.feedback-category-badge.bug-report {
    background-color: #f8d7da;
    color: #721c24;
}

.feedback-category-badge.general-comment {
    background-color: #d4edda;
    color: #155724;
}

.feedback-admin-empty {
    text-align: center;
    padding: 40px 20px;
    color: #6c757d;
    font-size: 14px;
}

/* =============================================
   Feedback Detail Modal (Admin Grid Row Click)
   ============================================= */

.feedback-detail-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 99999999;
}

.feedback-detail-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 560px;
    max-width: 90%;
    max-height: 80vh;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
    z-index: 999999999;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    font-family: "Open Sans", sans-serif;
}

.feedback-detail-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 20px;
    background-color: #427FB7;
    color: #fff;
}

.feedback-detail-header h5 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
}

.feedback-detail-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    opacity: 0.8;
    transition: opacity 0.2s;
}

.feedback-detail-close:hover {
    opacity: 1;
}

.feedback-detail-body {
    padding: 20px;
    overflow-y: auto;
}

.feedback-detail-row {
    display: flex;
    margin-bottom: 12px;
}

.feedback-detail-row.feedback-detail-fullwidth {
    flex-direction: column;
}

.feedback-detail-label {
    font-size: 13px;
    font-weight: 600;
    color: #555;
    min-width: 80px;
    flex-shrink: 0;
}

.feedback-detail-value {
    font-size: 13px;
    color: #333;
    word-break: break-word;
}

.feedback-detail-text {
    font-size: 13px;
    color: #333;
    margin-top: 6px;
    padding: 12px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    white-space: pre-wrap;
    word-break: break-word;
    max-height: 300px;
    overflow-y: auto;
}


/* Delete confirmation popup improvements */
.popupwraper.minipopup .popupcontent p {
    font-size: 15px;
    font-weight: 500;
    margin-bottom: 20px;
}

.popupwraper.minipopup .popupcontent .text-center {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding-bottom: 10px;
}

.popupwraper.minipopup .popupcontent .dashboardbtn {
    min-width: 80px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    border: none;
}

.popupwraper.minipopup .popupcontent .dashboardbtn.close {
    background-color: #6c757d;
    color: #fff;
    box-shadow: 0px 4px 4px 0px #00000040;
}

.popupwraper.minipopup .popupcontent .dashboardbtn.close:hover {
    background-color: #5a6268;
}

/* Preview icon size */
.feedback-mgmt-wrap .preview-row {
    width: 14px !important;
    height: 14px !important;
}

/* Constrain active filters dropdown to button width, not full grid */
.feedback-submissions-grid .active-filters-wrap {
    position: relative;
    display: inline-block;
}
