/* frontend-styles.css */

/* Allgemeine Container */
.rtp-frontend-form-container,
.rtp-my-tickets-container {
    margin-bottom: 30px;
    padding: 20px;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    background-color: #f9f9f9;
    box-sizing: border-box; /* Hinzugefügt, um Padding und Border in die Gesamtbreite einzubeziehen */
    overflow-x: auto; /* NEU: Fügt horizontalen Scrollbalken hinzu, NUR wenn der Inhalt wirklich breiter ist */
	width: 100%; /* Ist für Block-Elemente oft schon Standard, aber kann explizit gesetzt werden */
    max-width: 1200px; /* Beispiel: Setze eine maximale Breite, wenn du es nicht zu breit haben willst */
    margin-left: auto; */ /* Zentriert den Container, wenn max-width gesetzt ist */
    margin-right: auto; */
}

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

.rtp-my-tickets-header h2 {
    margin-bottom: 0;
}

a.rtp-button-new-ticket,
button.rtp-button-new-ticket { /* Falls du es als Button-Element machst */
    /* WordPress Button Styles oder eigene */
    display: inline-block;
    padding: 8px 15px;
    background-color: #0073aa; /* WordPress Blau */
    color: #fff;
    text-decoration: none;
    border-radius: 3px;
    font-size: 14px;
    line-height: 1.5;
    border: 1px solid #0073aa;
}
a.rtp-button-new-ticket:hover,
button.rtp-button-new-ticket:hover {
    background-color: #005a87;
    border-color: #005a87;
    color: #fff;
}


/* Ticket Formular Styling */
.rtp-frontend-form-container h2 {
    margin-top: 0;
    margin-bottom: 20px;
}

.rtp-frontend-form-container .form-row {
    margin-bottom: 15px;
}

.rtp-frontend-form-container label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.rtp-frontend-form-container input[type="text"],
.rtp-frontend-form-container input[type="email"],
.rtp-frontend-form-container select,
.rtp-frontend-form-container textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 3px;
    box-sizing: border-box; /* Wichtig für width: 100% */
}

.rtp-frontend-form-container textarea {
    min-height: 120px;
}

.rtp-frontend-form-container .required {
    color: red;
}

.rtp-submission-message {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
    border: 1px solid transparent;
}
.rtp-submission-message.success {
    color: #155724;
    background-color: #d4edda;
    border-color: #c3e6cb;
}
.rtp-submission-message.error {
    color: #721c24;
    background-color: #f8d7da;
    border-color: #f5c6cb;
}

.rtp-frontend-form-container .form-submit button {
    /* Du kannst WordPress-Standard-Buttonklassen verwenden oder eigene */
}


/* "Meine Tickets" Liste */
.rtp-my-tickets-table {
    width: 100%;
    margin-bottom: 20px;
    border-collapse: collapse;
      table-layout: fixed; /* NEU: Wichtig, damit Spaltenbreiten besser kontrolliert werden können und Zellen nicht versuchen, sich um jeden Preis auszudehnen */
}

.rtp-my-tickets-table th,
.rtp-my-tickets-table td {
    padding: 10px 8px; /* Padding leicht angepasst für mehr Platz */
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
        word-wrap: break-word; /* NEU: Erlaubt Umbruch langer Wörter ohne Leerzeichen */
    overflow-wrap: break-word; /* NEU: Standard-Alternative zu word-wrap */
    hyphens: auto; /* NEU: Erlaubt automatische Silbentrennung (Browserunterstützung beachten) */
}

.rtp-my-tickets-table th {
    background-color: #f1f1f1;
    font-weight: bold;
}

.rtp-my-tickets-table tbody tr:hover {
    background-color: #f9f9f9;
}

.rtp-my-tickets-table a {
    text-decoration: none;
    color: #0073aa;
}
.rtp-my-tickets-table a:hover {
    text-decoration: underline;
}

/* Optionale Spaltenbreiten (Anpassen nach Bedarf) */
/* Du kannst spezifische Breiten für Spalten definieren, wenn nötig.
   Am besten über Klassen an den th/td Elementen oder nth-child Selektoren.
 */
.rtp-my-tickets-table th:nth-child(1), /* Ticket ID */
.rtp-my-tickets-table td:nth-child(1) {
     width: 14%; 
}
 
.rtp-my-tickets-table th:nth-child(2), /* Betreff */
.rtp-my-tickets-table td:nth-child(2) {
  width: 30%; /* Beispielbreite für die längste Spalte */
}

.rtp-my-tickets-table th:nth-child(3), /* Ticket ID */
.rtp-my-tickets-table td:nth-child(3) {
     width: 15%; 
}

.rtp-my-tickets-table th:nth-child(6), /* Aktion */
.rtp-my-tickets-table td:nth-child(6) {
  width: 10%;
  white-space: nowrap; /* Verhindert Umbruch bei kurzen Aktionslinks */
}


/* Pagination */
.rtp-pagination {
    margin-top: 20px;
    text-align: center;
}
.rtp-pagination .page-numbers {
    display: inline-block;
    padding: 5px 10px;
    margin: 0 2px;
    border: 1px solid #ccc;
    text-decoration: none;
    border-radius: 3px;
}
.rtp-pagination .page-numbers.current,
.rtp-pagination .page-numbers:hover {
    background-color: #0073aa;
    color: #fff;
    border-color: #0073aa;
}

/* Ticket Detailansicht */
.rtp-ticket-detail-view h3 {
    margin-top: 0;
    margin-bottom: 15px;
}
.rtp-ticket-detail-view p {
    margin-bottom: 10px;
}

.rtp-ticket-messages {
    margin-top: 25px;
    border-top: 1px solid #eee;
    padding-top: 15px;
}
.rtp-ticket-messages h4 {
    margin-top: 0;
    margin-bottom: 15px;
}
.rtp-message {
    border: 1px solid #e0e0e0;
    padding: 15px;
    margin-bottom: 15px;
    border-radius: 4px;
}
.rtp-initial-message {
    background-color: #f9f9f9;
}
.rtp-customer-reply {
    background-color: #f0f8ff; /* AliceBlue für Kunden */
    border-left: 3px solid #7cb9e8;
}
.rtp-agent-reply {
    background-color: #fff8e1; /* Helles Gelb für Agenten */
    border-left: 3px solid #ffc107;
}
.rtp-message-meta {
    font-size: 0.9em;
    color: #777;
    margin-bottom: 8px;
    border-bottom: 1px dotted #eee;
    padding-bottom: 5px;
}
.rtp-message-content {
    line-height: 1.6;
}

.rtp-reply-form {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px dashed #ccc;
}
.rtp-reply-form h4 {
    margin-top: 0;
}
.rtp-reply-form textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 3px;
    box-sizing: border-box;
    min-height: 100px;
    margin-bottom: 10px;
}