/* Hinweisgeber-System - Frontend Styles */

/* Form Container */
.hgs-form-container,
.hgs-login-container,
.hgs-chat-container {
    max-width: 800px;
    margin: 30px auto;
    padding: 30px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.hgs-form-header,
.hgs-login-header,
.hgs-chat-header {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #0073aa;
}

.hgs-form-header h2,
.hgs-login-header h2,
.hgs-chat-header h2 {
    margin: 0 0 10px 0;
    color: #0073aa;
    font-size: 28px;
}

.hgs-form-description,
.hgs-login-description {
    margin: 10px 0 0;
    color: #666;
    line-height: 1.6;
}

/* Messages */
.hgs-message-box {
    padding: 15px;
    margin: 15px 0;
    border-radius: 5px;
    border-left: 4px solid;
}

.hgs-message-success {
    background: #d4edda;
    border-color: #28a745;
    color: #155724;
}

.hgs-message-error {
    background: #f8d7da;
    border-color: #dc3545;
    color: #721c24;
}

.hgs-message-info {
    background: #d1ecf1;
    border-color: #17a2b8;
    color: #0c5460;
}

/* Form Fields */
.hgs-form .hgs-field-wrapper {
    margin-bottom: 20px;
}

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

.hgs-required-mark {
    color: #dc3545;
    font-weight: bold;
}

.hgs-form input[type="text"],
.hgs-form input[type="email"],
.hgs-form input[type="number"],
.hgs-form input[type="date"],
.hgs-form select,
.hgs-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 15px;
    font-family: inherit;
    transition: border-color 0.2s;
}

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

.hgs-checkbox-group {
    margin-top: 8px;
}

.hgs-checkbox-label {
    display: flex;
    align-items: flex-start;
    margin-bottom: 10px;
    font-weight: normal;
    cursor: pointer;
}

.hgs-checkbox-label input[type="checkbox"] {
    margin-right: 10px;
    margin-top: 4px;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.hgs-field-description {
    margin: 6px 0 0;
    font-size: 13px;
    color: #666;
    font-style: italic;
}

/* Submit Button */
.hgs-submit-button {
    background: #0073aa;
    color: #fff;
    border: none;
    padding: 14px 30px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.2s;
}

.hgs-submit-button:hover {
    background: #005a87;
}

.hgs-submit-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.hgs-form-footer {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

/* Success Message */
.hgs-success-message {
    text-align: center;
    padding: 30px;
}

.hgs-success-message h3 {
    color: #28a745;
    margin-bottom: 20px;
}

.hgs-token-display {
    background: #f8f9fa;
    border: 2px solid #0073aa;
    border-radius: 8px;
    padding: 25px;
    margin: 20px 0;
}

.hgs-token-code {
    font-size: 32px;
    font-weight: bold;
    color: #0073aa;
    letter-spacing: 2px;
    margin: 15px 0;
    padding: 15px;
    background: #fff;
    border-radius: 5px;
    border: 2px dashed #0073aa;
}

.hgs-token-info {
    margin: 15px 0 0;
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

/* Login Form */
.hgs-login-form {
    margin-top: 20px;
}

#hgs-token-input {
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 18px;
    text-align: center;
}

/* Chat */
.hgs-chat-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 10px;
    font-size: 14px;
}

.hgs-meta-item {
    padding: 5px 12px;
    background: #f8f9fa;
    border-radius: 15px;
}

.hgs-status-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.hgs-status-new {
    background: #d4edda;
    color: #155724;
}

.hgs-status-in_progress,
.hgs-status-in-progress {
    background: #fff3cd;
    color: #856404;
}

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

.hgs-report-data {
    margin: 25px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 5px;
}

.hgs-report-data h3 {
    margin-top: 0;
    color: #0073aa;
}

.hgs-data-list {
    margin-top: 15px;
}

.hgs-data-item {
    padding: 12px;
    margin-bottom: 10px;
    background: #fff;
    border-left: 3px solid #0073aa;
    border-radius: 3px;
}

.hgs-data-label {
    font-weight: 600;
    color: #0073aa;
    margin-bottom: 4px;
}

.hgs-data-value {
    color: #333;
    line-height: 1.6;
}

/* Chat Section */
.hgs-chat-section {
    margin-top: 30px;
}

.hgs-chat-section h3 {
    margin-bottom: 15px;
    color: #0073aa;
}

.hgs-chat-messages {
    max-height: 500px;
    overflow-y: auto;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 5px;
}

.hgs-message {
    margin-bottom: 15px;
    padding: 12px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.hgs-message-admin {
    border-left: 3px solid #0073aa;
}

.hgs-message-user {
    border-left: 3px solid #28a745;
}

.hgs-message-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 13px;
}

.hgs-message-header strong {
    color: #0073aa;
}

.hgs-message-time {
    color: #999;
}

.hgs-message-body {
    line-height: 1.6;
    color: #333;
}

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

.hgs-message-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
    font-family: inherit;
    margin-bottom: 10px;
}

.hgs-chat-footer {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #ddd;
    text-align: center;
}

.hgs-info-text {
    color: #666;
    font-size: 13px;
    margin: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .hgs-form-container,
    .hgs-login-container,
    .hgs-chat-container {
        padding: 20px;
        margin: 15px;
    }
    
    .hgs-token-code {
        font-size: 24px;
    }
    
    .hgs-chat-meta {
        flex-direction: column;
    }
}

/* Loading State */
.hgs-loading {
    opacity: 0.6;
    pointer-events: none;
}

.hgs-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0073aa;
    border-radius: 50%;
    animation: hgs-spin 1s linear infinite;
}

@keyframes hgs-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
