/*
 * Styles for local_enquiry plugin.
 * Minimal styles for plugin-specific components (e.g. CAPTCHA verification code display).
 * All form layouts, fieldsets, labels, inputs, and action buttons are styled natively by the active Moodle theme.
 */

.enquiry-captcha-code {
    display: inline-block;
    padding: 6px 16px;
    border-radius: 4px;
    border: 1px dashed #93c5fd;
    background: #eff6ff;
    color: #1d4ed8;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 6px;
    user-select: none;
}

/* Status Badges */
.badge-status {
    display: inline-block;
    padding: 0.35em 0.65em;
    font-size: 0.75rem;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.375rem;
}
.badge-status-new {
    background-color: #0d6efd;
    color: #ffffff;
}
.badge-status-contacted {
    background-color: #0dcaf0;
    color: #000000;
}
.badge-status-inprogress {
    background-color: #ffc107;
    color: #000000;
}
.badge-status-followup {
    background-color: #fd7e14;
    color: #ffffff;
}
.badge-status-done {
    background-color: #198754;
    color: #ffffff;
}
.badge-status-cancelled {
    background-color: #dc3545;
    color: #ffffff;
}
.badge-status-sync {
    background-color: #6f42c1;
    color: #ffffff;
}

/* Management Toolbar & Filter Bar */
.enquiry-filter-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.25rem;
}
.enquiry-stats-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none !important;
    background: #ffffff;
    border: 1px solid #dee2e6;
    color: #495057;
    transition: all 0.2s ease-in-out;
}
.enquiry-stats-pill:hover,
.enquiry-stats-pill.active {
    background: #0d6efd;
    color: #ffffff !important;
    border-color: #0d6efd;
}
.enquiry-stats-pill .count {
    margin-left: 0.4rem;
    background: rgba(0, 0, 0, 0.08);
    padding: 0.1rem 0.45rem;
    border-radius: 10px;
    font-size: 0.75rem;
}
.enquiry-stats-pill:hover .count,
.enquiry-stats-pill.active .count {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

/* Bulk Actions Bar */
.enquiry-bulk-bar {
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    border-radius: 6px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

/* Manage Table Tweaks */
.enquiry-table th,
.enquiry-table td {
    vertical-align: middle !important;
}
.enquiry-status-select {
    padding: 0.2rem 0.4rem;
    font-size: 0.82rem;
    border-radius: 4px;
    border: 1px solid #ced4da;
    background-color: #fff;
    cursor: pointer;
}

/* Email & Details Modals */
.enquiry-recipients-box {
    max-height: 120px;
    overflow-y: auto;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 4px;
    padding: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}
.enquiry-recipient-badge {
    background: #e2e8f0;
    color: #334155;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    display: inline-flex;
    align-items: center;
}
.merge-tag-btn {
    font-size: 0.75rem;
    padding: 0.15rem 0.45rem;
    margin: 0.15rem;
    cursor: pointer;
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    color: #1e293b;
}
.merge-tag-btn:hover {
    background: #0d6efd;
    color: #fff;
    border-color: #0d6efd;
}

/* Fallback modal styles for full theme independence */
.enquiry-modal-fallback {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1050;
    overflow-y: auto;
    display: none;
}
.enquiry-modal-fallback.open {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 3rem;
}
.enquiry-modal-content {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 700px;
    margin-bottom: 3rem;
    border: 1px solid #dee2e6;
}

