/**
 * TCT Messages Styles
 */

.tct-messages-wrapper {
    margin: 20px 0;
}

.messages-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
}

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

.messages-mainContainer {
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
}

.messages-list {
    padding: 0;
}

.message-item {
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.message-item:last-child {
    border-bottom: none;
}

.message-item h4 {
    margin: 0 0 10px 0;
    color: #2271b1;
    font-size: 1.1em;
}

.message-item p {
    margin: 0 0 10px 0;
    color: #333;
    line-height: 1.5;
}

.message-item small {
    color: #666;
    font-size: 0.9em;
}

.no-messages {
    padding: 40px;
    text-align: center;
    color: #666;
    font-style: italic;
}

.message-form {
    padding: 20px;
    background: #f9f9f9;
    border-top: 1px solid #ddd;
}

.message-form .form-row {
    margin-bottom: 15px;
}

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

.message-form input[type="text"],
.message-form textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 14px;
}

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

.message-form .submit-row {
    text-align: right;
}

.message-form button {
    margin-left: 10px;
}

.message-actions {
    margin-top: 10px;
}

.message-actions button {
    margin-right: 10px;
    padding: 4px 8px;
    font-size: 12px;
    border: 1px solid #ddd;
    background: #f7f7f7;
    border-radius: 3px;
    cursor: pointer;
}

.message-actions button:hover {
    background: #e7e7e7;
}

.message-actions .delete {
    color: #d63638;
    border-color: #d63638;
}

.message-actions .delete:hover {
    background: #fef2f2;
}

.message-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.message-status.active {
    background: #dbeafe;
    color: #1e40af;
}

.message-status.inactive {
    background: #fef2f2;
    color: #dc2626;
}

/* Admin specific styles */
.message-admin-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 15px;
    border-bottom: 1px solid #eee;
    background: #fff;
}

.message-admin-item:hover {
    background: #f9f9f9;
}

.message-content {
    flex: 1;
    margin-right: 20px;
}

.message-meta {
    text-align: right;
    min-width: 150px;
}

.tct-loading {
    padding: 40px;
    text-align: center;
    color: #666;
    font-style: italic;
}

.error {
    padding: 15px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 4px;
    color: #991b1b;
    margin: 10px 0;
}

/* Responsive design */
@media (max-width: 768px) {
    .messages-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .message-admin-item {
        flex-direction: column;
        gap: 10px;
    }
    
    .message-meta {
        text-align: left;
        min-width: auto;
    }
    
    .message-form input[type="text"],
    .message-form textarea {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}