/* WP Support Tickets - Public Styles */

.wpst-portal {
    max-width: 800px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.wpst-portal-header {
    margin-bottom: 20px;
}
.wpst-portal-header h2 {
    margin: 0 0 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.wpst-back-link {
    display: inline-block;
    margin-bottom: 10px;
    text-decoration: none;
    color: #0073aa;
}
.wpst-back-link:hover {
    color: #005177;
}

/* Buttons */
.wpst-btn {
    display: inline-block;
    padding: 8px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    line-height: 1.5;
}
.wpst-btn-primary {
    background: #0073aa;
    color: #fff;
}
.wpst-btn-primary:hover {
    background: #005177;
    color: #fff;
}

/* Badge */
.wpst-badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 3px;
    color: #fff;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
}

/* Ticket list cards */
.wpst-ticket-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.wpst-ticket-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 15px 20px;
    transition: border-color 0.2s;
}
.wpst-ticket-card:hover {
    border-color: #0073aa;
}
.wpst-ticket-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}
.wpst-ticket-number {
    font-size: 12px;
    color: #666;
    font-family: monospace;
}
.wpst-ticket-card-title {
    margin: 0 0 8px;
    font-size: 16px;
}
.wpst-ticket-card-title a {
    text-decoration: none;
    color: #23282d;
}
.wpst-ticket-card-title a:hover {
    color: #0073aa;
}
.wpst-ticket-card-meta {
    display: flex;
    gap: 15px;
    font-size: 13px;
    color: #666;
}

/* Messages */
.wpst-messages {
    margin-bottom: 20px;
}
.wpst-message {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-bottom: 10px;
    overflow: hidden;
}
.wpst-message-header {
    background: #f7f7f7;
    padding: 8px 15px;
    border-bottom: 1px solid #ddd;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
}
.wpst-message-agent .wpst-message-header {
    background: #e8f4fd;
}
.wpst-message-system .wpst-message-header {
    background: #fff8e1;
}
.wpst-message-type {
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 3px;
    background: #e2e3e5;
    color: #383d41;
    text-transform: uppercase;
}
.wpst-message-date {
    margin-left: auto;
    color: #999;
    font-size: 12px;
}
.wpst-message-body {
    padding: 15px;
    line-height: 1.6;
}
.wpst-message-body img {
    max-width: 100%;
    height: auto;
}
.wpst-attachments {
    padding: 10px 15px;
    background: #fafafa;
    border-top: 1px solid #eee;
    font-size: 13px;
}
.wpst-attachments ul {
    margin: 5px 0 0;
    padding-left: 20px;
}

/* Reply form */
.wpst-reply-form {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 20px;
}
.wpst-reply-form h3 {
    margin: 0 0 10px;
}
.wpst-reply-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
    font-size: 14px;
    margin-bottom: 10px;
    box-sizing: border-box;
}
.wpst-reply-form textarea:focus {
    border-color: #0073aa;
    outline: none;
}

/* Form styles */
.wpst-form-group {
    margin-bottom: 15px;
}
.wpst-form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 14px;
}
.wpst-form-group .required {
    color: #dc3545;
}
.wpst-input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
    box-sizing: border-box;
}
.wpst-input:focus {
    border-color: #0073aa;
    outline: none;
}
.wpst-form-row {
    display: flex;
    gap: 15px;
}
.wpst-form-half {
    flex: 1;
}

/* Status message */
.wpst-status-msg {
    display: inline-block;
    margin-left: 10px;
    font-size: 14px;
}

/* Empty state */
.wpst-empty-state {
    text-align: center;
    padding: 40px 20px;
    background: #f9f9f9;
    border-radius: 6px;
    color: #666;
}

/* Pagination */
.wpst-pagination {
    margin-top: 20px;
    display: flex;
    gap: 5px;
    justify-content: center;
}
.wpst-page-link,
.wpst-page-current {
    display: inline-block;
    padding: 5px 12px;
    border: 1px solid #ddd;
    border-radius: 3px;
    text-decoration: none;
    font-size: 14px;
}
.wpst-page-current {
    background: #0073aa;
    color: #fff;
    border-color: #0073aa;
}
.wpst-page-link:hover {
    background: #f0f0f0;
}

/* Login required */
.wpst-login-required {
    text-align: center;
    padding: 40px 20px;
    background: #f9f9f9;
    border-radius: 6px;
}

/* Responsive */
@media screen and (max-width: 600px) {
    .wpst-form-row {
        flex-direction: column;
        gap: 0;
    }
    .wpst-message-header {
        flex-wrap: wrap;
    }
    .wpst-message-date {
        width: 100%;
        margin-left: 0;
        margin-top: 4px;
    }
}
