/**
 * Customer Support Public CSS
 *
 * Styles for frontend ticket functionality including forms, lists, and views.
 *
 * @package    Customersupport
 * @subpackage Customersupport/public/css
 */

/* Form Styles */
.customersupport-form {
    max-width: 600px;
    margin: 20px 0;
    padding: 20px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

.customersupport-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.customersupport-form input[type="text"],
.customersupport-form input[type="email"],
.customersupport-form select,
.customersupport-form textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.customersupport-form input[type="text"]:focus,
.customersupport-form input[type="email"]:focus,
.customersupport-form select:focus,
.customersupport-form textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0,115,170,0.2);
}

.customersupport-form textarea {
    resize: vertical;
    min-height: 100px;
}

.customersupport-form button {
    background: #0073aa;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.customersupport-form button:hover {
    background: #005a87;
}

.customersupport-form button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.form-message {
    padding: 10px 15px;
    border-radius: 4px;
    margin-top: 15px;
    font-weight: 500;
}

.form-message.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
}

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

/* Ticket List Styles */
.customersupport-list {
    max-width: 800px;
    margin: 20px 0;
}

.customersupport-list .form-group {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    align-items: end;
}

.customersupport-list input[type="email"] {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.customersupport-list button {
    background: #0073aa;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
}

.customersupport-list button:hover {
    background: #005a87;
}

#tickets-loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

.tickets-header {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #0073aa;
}

.tickets-header h3 {
    margin: 0;
    color: #333;
}

.tickets-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.ticket-item {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    transition: box-shadow 0.3s ease;
}

.ticket-item:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

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

.ticket-number {
    font-weight: 600;
    font-size: 18px;
    color: #0073aa;
}

.ticket-status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.ticket-status.open {
    background: #d4edda;
    color: #155724;
}

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

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

.ticket-status.resolved {
    background: #d1ecf1;
    color: #0c5460;
}

.ticket-subject {
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.ticket-actions {
    margin-top: 15px;
}

.ticket-actions button {
    background: #28a745;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.ticket-actions button:hover {
    background: #218838;
}

/* Ticket View Styles */
.customersupport-view {
    max-width: 800px;
    margin: 20px 0;
}

.customersupport-view .form-group {
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    align-items: end;
}

.customersupport-view input[type="text"],
.customersupport-view input[type="email"] {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.customersupport-view button {
    background: #0073aa;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    white-space: nowrap;
}

.customersupport-view button:hover {
    background: #005a87;
}

#ticket-loading {
    text-align: center;
    padding: 20px;
    color: #666;
}

.ticket-detail {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 25px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.ticket-detail .ticket-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.ticket-detail .ticket-header h3 {
    margin: 0;
    color: #333;
    font-size: 24px;
}

.ticket-meta {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
}

.ticket-meta p {
    margin: 5px 0;
    color: #666;
}

.ticket-description {
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 4px;
    border-left: 4px solid #0073aa;
}

.ticket-description h4 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #333;
}

.ticket-description p {
    margin: 0;
    line-height: 1.6;
    color: #555;
}

/* Reply Form Styles */
.ticket-reply-form {
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.ticket-reply-form h4 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
}

.ticket-reply-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    resize: vertical;
    min-height: 100px;
    margin-bottom: 15px;
}

.ticket-reply-form textarea:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 2px rgba(0,115,170,0.2);
}

.file-upload {
    margin-bottom: 15px;
}

.file-upload-input {
    margin-bottom: 10px;
}

.file-list {
    margin-top: 10px;
}

.file-list-header {
    font-weight: 600;
    margin-bottom: 5px;
    color: #333;
}

.file-item {
    padding: 5px 0;
    color: #666;
    font-size: 14px;
}

.file-name {
    font-weight: 500;
}

.file-size {
    color: #999;
}

.ticket-reply-form button {
    background: #28a745;
    color: #fff;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.ticket-reply-form button:hover {
    background: #218838;
}

.ticket-reply-form button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

/* Responsive Design */
@media (max-width: 768px) {
    .customersupport-form,
    .customersupport-list,
    .customersupport-view {
        margin: 10px;
        padding: 15px;
    }
    
    .customersupport-list .form-group,
    .customersupport-view .form-group {
        flex-direction: column;
        align-items: stretch;
    }
    
    .customersupport-list input[type="email"],
    .customersupport-view input[type="text"],
    .customersupport-view input[type="email"] {
        margin-bottom: 10px;
    }
    
    .ticket-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .ticket-detail .ticket-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .ticket-detail .ticket-header h3 {
        font-size: 20px;
    }
    
    .ticket-actions {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }
    
    .ticket-actions button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .customersupport-form,
    .customersupport-list,
    .customersupport-view {
        margin: 5px;
        padding: 10px;
    }
    
    .ticket-item,
    .ticket-detail {
        padding: 15px;
    }
    
    .ticket-reply-form {
        padding: 15px;
    }
}