/* e-comments: Floating selection badge & modal styling */

#e-comments-badge {
    position: absolute;
    display: none;
    z-index: 9999;
    background: #1e293b;
    color: #f8fafc;
    border: 1px solid #334155;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 13px;
    font-family: inherit;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: transform 0.15s ease, opacity 0.15s ease;
    align-items: center;
    gap: 6px;
}

#e-comments-badge:hover {
    background: #0f172a;
    transform: translateY(-2px);
}

/* Modal Overlay */
#e-comments-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(3px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

#e-comments-modal {
    background: #ffffff;
    color: #1e293b;
    width: 90%;
    max-width: 540px;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    font-family: inherit;
    animation: e-comments-fadein 0.2s ease-out;
}

@keyframes e-comments-fadein {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

.e-comments-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.e-comments-header h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #0f172a;
}

.e-comments-close {
    background: none;
    border: none;
    font-size: 20px;
    line-height: 1;
    color: #64748b;
    cursor: pointer;
    padding: 0 4px;
}

.e-comments-close:hover {
    color: #0f172a;
}

.e-comments-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-height: 75vh;
    overflow-y: auto;
}

.e-comments-quote-preview {
    background: #f1f5f9;
    border-left: 3px solid #3b82f6;
    padding: 10px 14px;
    font-style: italic;
    font-size: 13px;
    color: #334155;
    border-radius: 0 4px 4px 0;
    max-height: 100px;
    overflow-y: auto;
}

.e-comments-form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.e-comments-form-group label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #475569;
}

.e-comments-form-group input,
.e-comments-form-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
}

.e-comments-form-group input:focus,
.e-comments-form-group textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.e-comments-form-group textarea {
    min-height: 110px;
    resize: vertical;
}

/* Honeypot hidden input */
.e-comments-gotcha {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    position: absolute !important;
    left: -9999px !important;
}

.e-comments-footer {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 14px 20px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
    gap: 10px;
}

.e-comments-btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
}

.e-comments-btn-cancel {
    background: #ffffff;
    border-color: #cbd5e1;
    color: #475569;
}

.e-comments-btn-cancel:hover {
    background: #f1f5f9;
}

.e-comments-btn-submit {
    background: #2563eb;
    color: #ffffff;
}

.e-comments-btn-submit:hover {
    background: #1d4ed8;
}

.e-comments-btn-submit:disabled {
    background: #94a3b8;
    cursor: not-allowed;
}

.e-comments-alert {
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 13px;
    display: none;
}

.e-comments-alert-success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.e-comments-alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

/* Floating Toast Notification */
#e-comments-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 10001;
    max-width: 380px;
    padding: 12px 18px;
    border-radius: 8px;
    font-size: 13.5px;
    font-family: inherit;
    line-height: 1.4;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    background: #0f172a;
    color: #f8fafc;
    border-left: 4px solid #3b82f6;
    display: none;
    align-items: center;
    gap: 10px;
    animation: e-comments-toast-in 0.25s ease-out;
}

#e-comments-toast.e-comments-toast-success {
    border-left-color: #22c55e;
}

#e-comments-toast.e-comments-toast-error {
    border-left-color: #ef4444;
}

@keyframes e-comments-toast-in {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
