/**
 * HOA Ticketing Frontend Styles
 */

/* Form Styles */
.hoa-ticket-form-wrapper {
    max-width: 700px;
    margin: 0 auto;
}

.hoa-emergency-notice {
    background: #fff3cd;
    border: 1px solid #ffc107;
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.hoa-emergency-notice strong {
    color: #856404;
    display: block;
    margin-bottom: 5px;
}

.hoa-form {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 8px;
}

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

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

.hoa-form-group .required {
    color: #dc3545;
}

.hoa-form-group input[type="text"],
.hoa-form-group input[type="email"],
.hoa-form-group select,
.hoa-form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.hoa-form-group input[type="file"] {
    padding: 10px 0;
}

.hoa-form-group small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 13px;
}

.hoa-radio-group label {
    display: inline-block;
    margin-right: 20px;
    font-weight: normal;
}

.hoa-radio-group input[type="radio"] {
    margin-right: 5px;
}

.hoa-submit-button {
    background: #007bff;
    color: white;
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background 0.2s;
}

.hoa-submit-button:hover {
    background: #0056b3;
}

.hoa-submit-button:disabled {
    background: #6c757d;
    cursor: not-allowed;
}

/* Messages */
.hoa-messages {
    margin-top: 15px;
}

.hoa-message {
    padding: 12px;
    border-radius: 4px;
    margin-bottom: 10px;
}

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

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

/* Ticket List */
.hoa-tickets-list {
    max-width: 1000px;
}

.hoa-tickets-list h2 {
    margin-bottom: 20px;
}

.hoa-empty-state {
    text-align: center;
    padding: 40px;
    background: #f8f9fa;
    border-radius: 8px;
}

/* My Assigned Tickets Table - Clean Layout with Visible Columns */
.hoa-tickets-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    margin-top: 20px;
    font-size: 14px;
    border: 1px solid #adb5bd;
    border-radius: 8px;
    overflow: hidden;
}

.hoa-tickets-table thead {
    background: #495057;
}

.hoa-tickets-table th {
    padding: 16px 20px;
    font-weight: 600;
    text-align: left;
    color: white;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-right: 1px solid #6c757d;
    border-bottom: 2px solid #343a40;
}

.hoa-tickets-table th:last-child {
    border-right: none;
}

.hoa-tickets-table td {
    padding: 20px;
    border-bottom: 1px solid #dee2e6;
    border-right: 1px solid #e9ecef;
    vertical-align: middle;
}

.hoa-tickets-table td:last-child {
    border-right: none;
}

.hoa-tickets-table tbody tr:hover {
    background: #f8f9fa;
}

.hoa-tickets-table tbody tr:last-child td {
    border-bottom: none;
}

.hoa-tickets-table td:first-child {
    font-family: monospace;
    font-weight: 600;
    font-size: 14px;
}

.hoa-tickets-table td:nth-child(2) {
    font-weight: 500;
    min-width: 200px;
}

.hoa-tickets-table td:nth-child(3),
.hoa-tickets-table td:nth-child(4),
.hoa-tickets-table td:nth-child(5) {
    text-align: center;
}

.hoa-tickets-table td:last-child {
    text-align: right;
    white-space: nowrap;
}

/* Status Badges */
.hoa-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.hoa-status-submitted {
    background: #e9ecef;
    color: #495057;
}

.hoa-status-acknowledged {
    background: #d1ecf1;
    color: #0c5460;
}

.hoa-status-under-review {
    background: #fff3cd;
    color: #856404;
}

.hoa-status-in-progress {
    background: #d4edda;
    color: #155724;
}

.hoa-status-waiting-vendor {
    background: #f8d7da;
    color: #721c24;
}

.hoa-status-resolved {
    background: #d4edda;
    color: #155724;
}

.hoa-status-closed {
    background: #6c757d;
    color: white;
}

/* Buttons */
.hoa-button,
.hoa-button-small {
    display: inline-block;
    padding: 8px 16px;
    background: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: background 0.2s;
}

.hoa-button:hover {
    background: #0056b3;
    color: white;
}

.hoa-button-small {
    padding: 4px 12px;
    font-size: 13px;
}

/* Ticket Detail & Assigned Ticket Management */
.hoa-ticket-detail {
    max-width: 800px;
}

.hoa-tickets-container {
    max-width: 1200px;
    margin: 0 auto;
}

.hoa-tickets-container h2 {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.hoa-ticket-detail-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

@media (max-width: 768px) {
    .hoa-ticket-detail-grid {
        grid-template-columns: 1fr;
    }
}

.hoa-ticket-info {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.hoa-ticket-info h3 {
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.hoa-info-table {
    width: 100%;
}

.hoa-info-table th,
.hoa-info-table td {
    padding: 12px 0;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid #f0f0f0;
}

.hoa-info-table th {
    width: 35%;
    color: #666;
    font-weight: 600;
}

.hoa-info-table td {
    color: #333;
}

.hoa-info-table tr:last-child th,
.hoa-info-table tr:last-child td {
    border-bottom: none;
}

.hoa-ticket-actions {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.hoa-box {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.hoa-box h3 {
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

.hoa-select,
.hoa-textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 15px;
    margin-bottom: 15px;
}

.hoa-select:focus,
.hoa-textarea:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0,123,255,0.1);
}

.hoa-box label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.hoa-box p {
    margin-bottom: 15px;
}

.hoa-box p:last-child {
    margin-bottom: 0;
}

.hoa-comments-section {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-top: 30px;
}

.hoa-comments-section h3 {
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
}

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

.hoa-comment {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #007bff;
}

.hoa-comment-private {
    border-left-color: #dc3545;
    background: #fff5f5;
}

.hoa-comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid #e9ecef;
}

.hoa-private-label {
    background: #dc3545;
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.hoa-comment-date {
    color: #666;
    font-size: 13px;
}

.hoa-comment-content {
    line-height: 1.6;
    color: #333;
}

.hoa-button-secondary {
    background: #6c757d;
}

.hoa-button-secondary:hover {
    background: #545b62;
}

.hoa-ticket-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #dee2e6;
}

.hoa-ticket-actions .hoa-button,
.hoa-ticket-actions .hoa-submit-button {
    margin: 0;
}

.hoa-ticket-header {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.hoa-ticket-header h2 {
    margin: 0 0 10px 0;
}

.hoa-ticket-meta {
    display: flex;
    gap: 15px;
    align-items: center;
}

.hoa-ticket-number {
    font-family: monospace;
    font-size: 14px;
    color: #666;
}

.hoa-ticket-info {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.hoa-info-row {
    margin-bottom: 10px;
}

.hoa-info-row strong {
    display: inline-block;
    width: 150px;
    color: #666;
}

.hoa-ticket-description {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.hoa-ticket-description h3 {
    margin-top: 0;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #dee2e6;
}

/* Comments */
.hoa-ticket-comments {
    margin-bottom: 20px;
}

.hoa-ticket-comments h3 {
    margin-bottom: 15px;
}

.hoa-comment {
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 15px;
    border-left: 4px solid #007bff;
}

.hoa-comment-admin {
    border-left-color: #28a745;
}

.hoa-comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f0f0f0;
}

.hoa-comment-date {
    color: #666;
    font-size: 13px;
}

.hoa-comment-content {
    line-height: 1.6;
}

/* Login Required */
.hoa-login-required {
    background: #f8f9fa;
    padding: 30px;
    text-align: center;
    border-radius: 8px;
}

.hoa-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    color: #721c24;
    padding: 15px;
    border-radius: 4px;
    margin: 15px 0;
}

/* Emergency Contact Display */
.hoa-emergency-contact {
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 8px;
    margin-bottom: 20px;
    overflow: hidden;
}
.hoa-emergency-header {
    background: #ffc107;
    color: #856404;
    padding: 12px 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.hoa-emergency-header h3 {
    margin: 0;
    font-size: 1.1em;
}
.hoa-emergency-icon {
    font-size: 1.3em;
}
.hoa-emergency-content {
    padding: 15px;
}
.hoa-emergency-message {
    color: #856404;
    font-style: italic;
    margin-bottom: 15px;
}
.hoa-emergency-details p {
    margin: 5px 0;
}
.hoa-emergency-details a {
    color: #856404;
    text-decoration: underline;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .hoa-tickets-table {
        font-size: 14px;
    }
    
    .hoa-tickets-table th,
    .hoa-tickets-table td {
        padding: 8px;
    }
    
    .hoa-info-row strong {
        display: block;
        width: auto;
        margin-bottom: 5px;
    }
}
