/**
 * Queues Front-End Styles
 * Theme-agnostic styling for front-end ticket system
 */

/* ==========================================================================
   Layout & Container
   ========================================================================== */

.queues-frontend {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.queues-frontend-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e5e5e5;
}

.queues-frontend-header h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 600;
    color: #1d2327;
}

/* ==========================================================================
   Messages & Notifications
   ========================================================================== */

.queues-message p {
    margin: 0;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.queues-button--large {
    padding: 12px 24px;
    font-size: 16px;
}

/* ==========================================================================
   Panels
   ========================================================================== */

.queues-panel--description {
    padding: 20px;
}

.queues-panel--description h2 {
    margin-bottom: 16px;
    font-size: 24px;
    line-height: 1.3;
}

.queues-panel--description h3 {
    margin-top: 24px;
    margin-bottom: 12px;
    font-size: 16px;
    font-weight: 600;
    color: #646970;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ==========================================================================
   Forms
   ========================================================================== */

.queues-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.queues-form-grid--custom {
    margin-top: 12px;
}

.queues-form-field--full {
    grid-column: 1 / -1;
}

.queues-form-field--half {
    grid-column: span 1;
}

.queues-input--large {
    font-size: 16px;
    padding: 10px 14px;
}

.queues-description {
    margin-top: 8px;
    font-size: 13px;
    color: #646970;
    font-style: italic;
}

.queues-form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e5e5e5;
}

.queues-form-preset-header {
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 24px;
}

.queues-form-preset-title {
    margin: 0 0 12px;
    font-size: 20px;
    font-weight: 600;
    color: #1d2327;
}

.queues-form-preset-description {
    color: #2c3338;
    font-size: 14px;
}

.queues-form-preset-description p:last-child {
    margin-bottom: 0;
}

.queues-form-summary {
    background: #f6f7f7;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    padding: 8px 12px;
    font-size: 14px;
    color: #1d2327;
}

.queues-form-summary__value {
    font-weight: 600;
}

.queues-card--filters .queues-filter-form {
    margin: 0;
}

.queues-card--table {
    padding: 0;
    overflow: auto;
}

.queues-card--table .queues-table {
    border-radius: 0;
}

.queues-form-section-heading {
    grid-column: 1 / -1;
    padding-top: 8px;
    border-top: 1px solid #e5e5e5;
}

.queues-form-section-heading h3 {
    margin: 12px 0 4px;
    font-size: 16px;
    font-weight: 600;
    color: #1d2327;
}

.queues-form-section-heading .queues-description {
    margin: 0;
}

.queues-checkbox-label,
.queues-radio-label {
    display: block;
    margin-bottom: 8px;
    font-weight: normal;
    cursor: pointer;
}

.queues-checkbox-label input[type="checkbox"],
.queues-radio-label input[type="radio"] {
    margin-right: 8px;
}

/* ==========================================================================
   Filters
   ========================================================================== */

.queues-filters {
    margin-bottom: 24px;
}

.queues-filter-form {
    background: #f6f7f7;
    padding: 20px;
    border-radius: 6px;
    border: 1px solid #dcdcde;
}

.queues-filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    align-items: end;
}

.queues-filter-field {
    display: flex;
    flex-direction: column;
}

.queues-filter-field label {
    font-weight: 600;
    margin-bottom: 6px;
    font-size: 13px;
    color: #1d2327;
}

.queues-filter-field input,
.queues-filter-field select {
    width: 100%;
    padding: 6px 10px;
    font-size: 14px;
    border: 1px solid #8c8f94;
    border-radius: 4px;
}

.queues-filter-actions {
    display: flex;
    gap: 8px;
}

/* ==========================================================================
   Tables
   ========================================================================== */

/* ==========================================================================
   Badges
   ========================================================================== */

/* ==========================================================================
   Badges
   ========================================================================== */

/* ==========================================================================
   Ticket Info & Meta
   ========================================================================== */

.queues-ticket-info {
    margin-bottom: 24px;
}

.queues-ticket-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    padding: 20px;
    background: #f6f7f7;
    border-radius: 6px;
    border: 1px solid #dcdcde;
}

.queues-ticket-meta-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.queues-ticket-meta-item strong {
    font-size: 12px;
    font-weight: 600;
    color: #646970;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.queues-ticket-meta-item span {
    font-size: 14px;
    color: #1d2327;
}

/* ==========================================================================
   Ticket Content
   ========================================================================== */

.queues-ticket-content {
    line-height: 1.7;
    color: #2c3338;
}

.queues-ticket-content p {
    margin-bottom: 16px;
}

.queues-custom-fields-display {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e5e5e5;
}

.queues-custom-field-item {
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.queues-custom-field-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.queues-custom-field-item strong {
    color: #646970;
    margin-right: 8px;
    font-weight: 600;
}

/* ==========================================================================
   Comments
   ========================================================================== */

.queues-comments {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.queues-comment {
    padding: 16px;
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 6px;
    border-left: 4px solid #2271b1;
}

.queues-comment--external {
    border-left-color: #2271b1;
}

.queues-comment__meta {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e5e5;
    flex-wrap: wrap;
}

.queues-comment__author {
    font-weight: 600;
    color: #1d2327;
}

.queues-comment__date {
    color: #646970;
    font-size: 13px;
}

.queues-comment__body {
    line-height: 1.7;
    color: #2c3338;
}

.queues-comment__body p {
    margin-bottom: 12px;
}

.queues-comment__body p:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   Empty States
   ========================================================================== */

.queues-empty-state p {
    margin-bottom: 20px;
    font-size: 16px;
}

/* ==========================================================================
   Custom Fields Visibility
   ========================================================================== */

.queues-custom-field {
    display: none;
}

.queues-custom-field.is-active {
    display: block;
}

/* ==========================================================================
   Links
   ========================================================================== */

.queues-link {
    color: #2271b1;
    text-decoration: none;
    font-weight: 500;
}

.queues-link:hover {
    color: #135e96;
    text-decoration: underline;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 768px) {
    .queues-frontend {
        padding: 15px;
    }

    .queues-frontend-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .queues-frontend-header h1 {
        font-size: 24px;
    }

    .queues-form-grid,
    .queues-filter-row,
    .queues-ticket-meta {
        grid-template-columns: 1fr;
    }

    .queues-form-actions {
        flex-direction: column;
    }

    .queues-form-actions .queues-button {
        width: 100%;
        text-align: center;
    }

    .queues-table {
        font-size: 13px;
    }

    .queues-table th,
    .queues-table td {
        padding: 8px 12px;
    }
}

/* ==========================================================================
   Knowledgebase
   ========================================================================== */

.queues-knowledgebase__header {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.queues-knowledgebase__header h1 {
    font-size: 32px;
    margin: 0;
    color: #1d2327;
    font-weight: 600;
}

.queues-knowledgebase__search {
    display: flex;
    gap: 10px;
    align-items: center;
}

.queues-knowledgebase__search input[type="search"] {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    font-size: 14px;
}

.queues-knowledgebase__layout {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 24px;
}

@media (max-width: 900px) {
    .queues-knowledgebase__layout {
        grid-template-columns: 1fr;
    }
}

.queues-knowledgebase__sidebar {
    height: fit-content;
}

.queues-knowledgebase__sidebar h2 {
    margin: 0 0 16px 0;
    font-size: 18px;
    font-weight: 600;
    color: #1d2327;
}

.queues-knowledgebase__category-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.queues-knowledgebase__category-list li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 10px;
    border-radius: 4px;
    text-decoration: none;
    color: #1d2327;
    background: transparent;
    transition: background 0.15s ease, color 0.15s ease;
}

.queues-knowledgebase__category-list li a span {
    font-size: 12px;
    color: #50575e;
}

.queues-knowledgebase__category-list li a:hover,
.queues-knowledgebase__category-list li a.is-active {
    background: #f0f6fc;
    color: #135e96;
}

.queues-knowledgebase__content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.queues-knowledgebase__result-meta {
    margin: 0;
    color: #50575e;
    font-size: 14px;
}

.queues-knowledgebase__articles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}

.queues-knowledgebase__article {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.queues-knowledgebase__article h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.queues-knowledgebase__article h3 a {
    text-decoration: none;
    color: inherit;
}

.queues-knowledgebase__article h3 a:hover {
    color: #135e96;
}

.queues-knowledgebase__article-meta {
    margin: 0;
    font-size: 13px;
    color: #50575e;
}

.queues-knowledgebase__article-excerpt {
    margin: 0 0 6px 0;
    color: #1d2327;
    font-size: 14px;
    line-height: 1.5;
}

.queues-knowledgebase__read-more {
    align-self: flex-start;
}

.queues-knowledgebase__empty {
    text-align: center;
    color: #50575e;
}

.queues-knowledgebase__pagination {
    display: flex;
    justify-content: center;
}

.queues-knowledgebase__pagination .page-numbers {
    display: inline-block;
    margin: 0 6px;
    padding: 8px 12px;
    border: 1px solid #dcdcde;
    border-radius: 4px;
    text-decoration: none;
    color: #1d2327;
}

.queues-knowledgebase__pagination .page-numbers.current,
.queues-knowledgebase__pagination .page-numbers:hover {
    background: #2271b1;
    border-color: #2271b1;
    color: #fff;
}

.queues-knowledgebase__breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    font-size: 14px;
}

.queues-knowledgebase__breadcrumb a {
    color: #2271b1;
    text-decoration: none;
}

.queues-knowledgebase__breadcrumb a:hover {
    text-decoration: underline;
}

.queues-knowledgebase__single-article {
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 6px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.queues-knowledgebase__single-header h1 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 32px;
    line-height: 1.3;
}

.queues-knowledgebase__single-meta {
    margin: 0;
    color: #50575e;
    font-size: 14px;
}

.queues-knowledgebase__single-meta a {
    color: #2271b1;
    text-decoration: none;
}

.queues-knowledgebase__single-meta a:hover {
    text-decoration: underline;
}

.queues-knowledgebase__single-content {
    margin-top: 24px;
    font-size: 16px;
    line-height: 1.7;
    color: #1d2327;
}

.queues-knowledgebase__single-content p {
    margin-bottom: 16px;
}

