/**
 * SocialME Blesta Tickets - Styles
 */

/* Container */
.sbc-tickets-container {
    width: 100%;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    box-sizing: border-box;
}

/* Header */
.sbc-tickets-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.sbc-tickets-title {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sbc-tickets-count {
    font-size: 16px;
    color: #666;
    font-weight: normal;
}

/* Buttons */
.sbc-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
}

.sbc-btn-primary {
    background: #00a149 !important;
    color: #fff !important;
    border: none !important;
}

.sbc-btn-primary:hover {
    background: #008a3d !important;
    color: #fff !important;
}

.sbc-btn-secondary {
    background: #e9ecef;
    color: #333;
}

.sbc-btn-secondary:hover {
    background: #dee2e6;
    color: #333;
}

.sbc-btn-danger {
    background: #dc3545 !important;
    color: #fff !important;
    border: none !important;
}

.sbc-btn-danger:hover {
    background: #b02a37 !important;
    color: #fff !important;
}

/* Filters */
.sbc-tickets-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.sbc-filter-btn {
    padding: 8px 16px;
    border-radius: 20px;
    background: #f8f9fa;
    color: #666;
    text-decoration: none;
    font-size: 13px;
    transition: all 0.2s ease;
}

.sbc-filter-btn:hover {
    background: #e9ecef;
    color: #333;
}

.sbc-filter-btn.active {
    background: #FD5A23;
    color: #fff;
}

/* Ticket List */
.sbc-tickets-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sbc-ticket-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

.sbc-ticket-item:hover {
    border-color: #FD5A23;
    box-shadow: 0 2px 8px rgba(253, 90, 35, 0.1);
    transform: translateX(4px);
}

.sbc-ticket-id {
    font-weight: 600;
    color: #FD5A23;
    min-width: 70px;
}

.sbc-ticket-info {
    flex: 1;
    margin-left: 15px;
}

.sbc-ticket-subject {
    font-weight: 500;
    color: #333;
    margin-bottom: 4px;
}

.sbc-ticket-meta {
    font-size: 12px;
    color: #888;
    display: flex;
    gap: 15px;
}

.sbc-ticket-status {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-open {
    background: #ffeee8;
    color: #c4471c;
}

.status-awaiting {
    background: #fff3cd;
    color: #856404;
}

.status-progress {
    background: #cce5ff;
    color: #004085;
}

.status-hold {
    background: #e2e3e5;
    color: #383d41;
}

.status-closed {
    background: #f8d7da;
    color: #721c24;
}

.sbc-ticket-arrow {
    color: #ccc;
    font-size: 18px;
    margin-left: 15px;
}

/* Empty State */
.sbc-tickets-empty {
    text-align: center;
    padding: 60px 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.sbc-icon-large {
    font-size: 48px;
    display: block;
    margin-bottom: 15px;
}

.sbc-tickets-empty p {
    color: #666;
    margin-bottom: 20px;
}

/* Messages */
.sbc-tickets-message {
    text-align: center;
    padding: 40px;
    border-radius: 8px;
}

.sbc-tickets-message .sbc-icon {
    font-size: 40px;
    display: block;
    margin-bottom: 10px;
}

.sbc-tickets-message h3 {
    margin: 0 0 10px;
}

.sbc-tickets-warning {
    background: #fff3cd;
    border: 1px solid #ffc107;
}

.sbc-tickets-info {
    background: #cce5ff;
    border: 1px solid #007bff;
}

.sbc-tickets-error {
    background: #f8d7da;
    border: 1px solid #dc3545;
}

/* Single Ticket */
.sbc-ticket-single-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.sbc-back-link {
    color: #666;
    text-decoration: none;
    font-size: 14px;
}

.sbc-back-link:hover {
    color: #FD5A23;
}

.sbc-ticket-single-title {
    flex: 1;
}

.sbc-ticket-code {
    color: #FD5A23;
    font-size: 14px;
    font-weight: 600;
}

.sbc-ticket-single-title h2 {
    margin: 5px 0 0;
    font-size: 20px;
}

.sbc-ticket-single-status {
    padding: 6px 16px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 500;
}

/* Info Bar */
.sbc-ticket-info-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 20px;
}

.sbc-info-item {
    display: flex;
    gap: 8px;
    font-size: 13px;
}

.sbc-info-label {
    color: #666;
}

.sbc-info-value {
    font-weight: 500;
    color: #333;
}

.sbc-priority-high,
.sbc-priority-critical,
.sbc-priority-emergency {
    color: #dc3545;
}

/* Message Thread */
.sbc-ticket-thread {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 30px;
}

.sbc-message {
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.sbc-message-client {
    background: #f8f9fa;
    margin-right: 30px;
}

.sbc-message-staff {
    background: #fff5f0;
    margin-left: 30px;
    border-color: #fde0d6;
}

.sbc-message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.sbc-message-author {
    display: flex;
    align-items: center;
    gap: 8px;
}

.sbc-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.sbc-avatar-client {
    background: #e9ecef;
}

.sbc-avatar-staff {
    background: #fde0d6;
}

.sbc-author-name {
    font-weight: 500;
    color: #333;
}

.sbc-message-date {
    font-size: 12px;
    color: #888;
}

.sbc-message-body {
    color: #333;
    line-height: 1.6;
    white-space: pre-wrap;
}

.sbc-message-attachments {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #e9ecef;
}

.sbc-attachments-label {
    font-size: 12px;
    color: #666;
    margin-right: 10px;
}

.sbc-attachment {
    display: inline-block;
    padding: 4px 10px;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    font-size: 12px;
    color: #FD5A23;
    text-decoration: none;
    margin-right: 5px;
}

.sbc-attachment:hover {
    background: #f8f9fa;
}

/* Reply Form */
.sbc-ticket-reply-form {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
}

.sbc-ticket-reply-form h3 {
    margin: 0 0 15px;
    font-size: 16px;
    color: #333;
}

/* Closed Notice */
.sbc-ticket-closed-notice {
    text-align: center;
    padding: 30px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.sbc-ticket-closed-notice .sbc-icon {
    font-size: 32px;
    display: block;
    margin-bottom: 10px;
}

.sbc-ticket-closed-notice p {
    color: #666;
    margin-bottom: 15px;
}

/* New Ticket Form */
.sbc-ticket-form-header {
    margin-bottom: 25px;
}

.sbc-ticket-form-header h2 {
    margin: 15px 0 0;
    font-size: 22px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sbc-ticket-form {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 25px;
}

.sbc-form-group {
    margin-bottom: 20px;
}

.sbc-form-group label {
    display: block;
    font-weight: 500;
    color: #333;
    margin-bottom: 8px;
}

.sbc-required {
    color: #dc3545;
}

.sbc-form-group input[type="text"],
.sbc-form-group select,
.sbc-form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
}

.sbc-form-group input[type="text"]:focus,
.sbc-form-group select:focus,
.sbc-form-group textarea:focus {
    outline: none;
    border-color: #FD5A23;
    box-shadow: 0 0 0 3px rgba(253, 90, 35, 0.1);
}

.sbc-form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* Priority Options */
.sbc-priority-options {
    display: flex;
    gap: 15px;
}

.sbc-priority-option {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.sbc-priority-option input[type="radio"] {
    width: auto;
}

.sbc-priority-label {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 13px;
}

.sbc-priority-low {
    background: #e9ecef;
    color: #666;
}

.sbc-priority-medium {
    background: #cce5ff;
    color: #004085;
}

.sbc-priority-high {
    background: #f8d7da;
    color: #721c24;
}

/* Form Actions */
.sbc-form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 25px;
}

/* Form Messages */
.sbc-form-message {
    margin-top: 15px;
    padding: 12px;
    border-radius: 6px;
    font-size: 14px;
}

.sbc-form-message.success {
    background: #ffeee8;
    color: #c4471c;
    border: 1px solid #fdd5c7;
}

.sbc-form-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Pagination */
.sbc-tickets-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.sbc-page-info {
    color: #666;
    font-size: 14px;
}

/* Responsive */
@media (max-width: 768px) {
    .sbc-tickets-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .sbc-ticket-item {
        flex-wrap: wrap;
    }

    .sbc-ticket-id {
        min-width: 100%;
        margin-bottom: 5px;
    }

    .sbc-ticket-info {
        margin-left: 0;
        width: 100%;
    }

    .sbc-ticket-status {
        margin-top: 10px;
    }

    .sbc-ticket-arrow {
        display: none;
    }

    .sbc-ticket-single-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .sbc-message-client,
    .sbc-message-staff {
        margin-left: 0;
        margin-right: 0;
    }

    .sbc-ticket-info-bar {
        flex-direction: column;
        gap: 10px;
    }

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

    .sbc-form-actions .sbc-btn {
        width: 100%;
        justify-content: center;
    }

    .sbc-priority-options {
        flex-direction: column;
        gap: 10px;
    }
}

/* Icons */
.sbc-icon {
    font-style: normal;
}

/* ================================
   LOGIN FORM STYLES
   ================================ */

.sbc-login-box {
    max-width: 400px;
    margin: 40px auto;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.sbc-login-header {
    background: linear-gradient(135deg, #FD5A23 0%, #e04d1d 100%);
    color: #fff;
    padding: 30px;
    text-align: center;
}

.sbc-login-header .sbc-icon {
    display: block;
    margin-bottom: 15px;
}

.sbc-login-header .sbc-icon-svg {
    width: 48px;
    height: 48px;
    display: inline-block;
}

.sbc-login-header h2 {
    margin: 0 0 10px;
    font-size: 24px;
    font-weight: 600;
}

.sbc-login-header p {
    margin: 0;
    opacity: 0.9;
    font-size: 14px;
}

.sbc-login-form {
    padding: 30px;
}

.sbc-login-error {
    background: #f8d7da;
    color: #721c24;
    padding: 12px;
    margin: 0 30px;
    border-radius: 6px;
    font-size: 14px;
    text-align: center;
}

.sbc-btn-block {
    display: flex !important;
    width: 100% !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
}

.sbc-login-footer {
    text-align: center;
    padding: 20px 30px 30px;
    border-top: 1px solid #e9ecef;
    margin-top: 0;
}

.sbc-login-footer p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.sbc-login-footer a {
    color: #FD5A23;
    font-weight: 500;
    text-decoration: none;
}

.sbc-login-footer a:hover {
    text-decoration: underline;
}

/* User Bar */
.sbc-user-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
    background: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 14px;
}

.sbc-user-info {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #333;
}

.sbc-logout-link {
    color: #dc3545;
    text-decoration: none;
    font-size: 13px;
}

.sbc-logout-link:hover {
    text-decoration: underline;
}
