/**
 * Öffentliches CSS für das Abrechnung-Plugin
 *
 * @package    Abrechnung
 * @subpackage Abrechnung/public/css
 */

/* Allgemeine Formular-Styles */
.abrechnung-form {
    max-width: 800px;
    margin: 0 auto 30px;
    padding: 20px;
    background-color: #fff;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.abrechnung-form .form-title {
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
    font-size: 24px;
    color: #333;
}

.abrechnung-form .form-section {
    margin-bottom: 30px;
}

.abrechnung-form .section-title {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
    color: #444;
}

/* Flexbox-Layout für Formularfelder */
.abrechnung-form .form-fields-container {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}

.abrechnung-form .form-field {
    padding: 0 10px;
    margin-bottom: 20px;
    box-sizing: border-box;
}

/* Feldbreiten-Klassen */
.abrechnung-form .field-width-25 {
    width: 25%;
}

.abrechnung-form .field-width-33 {
    width: 33.333%;
}

.abrechnung-form .field-width-50 {
    width: 50%;
}

.abrechnung-form .field-width-66 {
    width: 66.666%;
}

.abrechnung-form .field-width-75 {
    width: 75%;
}

.abrechnung-form .field-width-100 {
    width: 100%;
}

/* Responsive Anpassungen für Feldbreiten */
@media (max-width: 768px) {
    .abrechnung-form .field-width-25,
    .abrechnung-form .field-width-33 {
        width: 50%;
    }
}

@media (max-width: 480px) {
    .abrechnung-form .field-width-25,
    .abrechnung-form .field-width-33,
    .abrechnung-form .field-width-50,
    .abrechnung-form .field-width-66,
    .abrechnung-form .field-width-75 {
        width: 100%;
    }
}

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

.abrechnung-form .field-description {
    margin-top: 3px;
    margin-bottom: 8px;
    font-size: 13px;
    color: #777;
}

.abrechnung-form input[type="text"],
.abrechnung-form input[type="email"],
.abrechnung-form input[type="number"],
.abrechnung-form input[type="tel"],
.abrechnung-form input[type="date"],
.abrechnung-form select,
.abrechnung-form textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f9f9f9;
    font-size: 14px;
    color: #333;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.abrechnung-form input[type="text"]:focus,
.abrechnung-form input[type="email"]:focus,
.abrechnung-form input[type="number"]:focus,
.abrechnung-form input[type="tel"]:focus,
.abrechnung-form input[type="date"]:focus,
.abrechnung-form select:focus,
.abrechnung-form textarea:focus {
    border-color: #4a90e2;
    box-shadow: 0 0 5px rgba(74, 144, 226, 0.3);
    outline: none;
}

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

.abrechnung-form .required-label {
    color: #e53935;
    margin-left: 3px;
}

/* Checkbox und Radio Styles */
.abrechnung-form .checkbox-group,
.abrechnung-form .radio-group {
    margin-bottom: 10px;
}

.abrechnung-form .checkbox-item,
.abrechnung-form .radio-item {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
}

.abrechnung-form .checkbox-item input,
.abrechnung-form .radio-item input {
    margin-right: 8px;
}

.abrechnung-form .checkbox-item label,
.abrechnung-form .radio-item label {
    font-weight: normal;
    margin-bottom: 0;
}

/* Datei-Upload Styles */
.abrechnung-form .file-upload-container {
    margin-top: 5px;
}

.abrechnung-form .abrechnung-file-upload {
    display: block;
    margin-bottom: 10px;
}

.abrechnung-form .file-preview {
    margin-top: 10px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f9f9f9;
}

.abrechnung-form .file-preview .file-name {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.abrechnung-form .file-preview .file-type {
    display: inline-block;
    padding: 3px 8px;
    background-color: #e0e0e0;
    border-radius: 3px;
    font-size: 12px;
    color: #555;
}

.abrechnung-form .file-preview-image {
    max-width: 100%;
    max-height: 200px;
    margin-top: 10px;
    border: 1px solid #ddd;
}

/* Unterschriften-Pad Styles */
.abrechnung-form .signature-pad-container {
    margin-top: 10px;
}

.abrechnung-form .signature-wrapper {
    border: 2px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    padding: 0;
    margin-bottom: 10px;
    position: relative;
    width: 100%;
}

.abrechnung-form .abrechnung-signature-pad {
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #fff;
    margin-bottom: 10px;
}

.abrechnung-form .signature-pad-canvas {
    width: 100%;
    height: 200px;
    cursor: crosshair;
    display: block;
    touch-action: none;
}

/* Größeres Signature Pad für mobile Geräte */
@media (max-width: 768px) {
    .abrechnung-form .signature-pad-canvas {
        height: 250px;
    }
}

@media (max-width: 480px) {
    .abrechnung-form .signature-pad-canvas {
        height: 300px;
    }
}

.abrechnung-form .clear-signature {
    display: inline-block;
    padding: 5px 10px;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 13px;
    color: #555;
    cursor: pointer;
    text-decoration: none;
}

.abrechnung-form .clear-signature:hover {
    background-color: #e0e0e0;
}

.abrechnung-form .signature-instructions {
    margin-top: 5px;
    font-size: 13px;
    color: #777;
}

/* Repeater-Felder Styles */
.abrechnung-form .repeater-container {
    margin-bottom: 15px;
}

.abrechnung-form .repeater-row {
    padding: 15px;
    margin-bottom: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f9f9f9;
}

.abrechnung-form .repeater-row-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #eee;
}

.abrechnung-form .repeater-row-title {
    font-weight: 600;
    color: #555;
}

.abrechnung-form .remove-row {
    color: #e53935;
    cursor: pointer;
    font-size: 13px;
    text-decoration: none;
}

.abrechnung-form .remove-row:hover {
    text-decoration: underline;
}

.abrechnung-form .repeater-fields {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}

.abrechnung-form .repeater-field {
    flex: 1 0 200px;
    padding: 0 10px;
    margin-bottom: 10px;
}

.abrechnung-form .add-row {
    display: inline-block;
    padding: 8px 15px;
    background-color: #4a90e2;
    border: none;
    border-radius: 4px;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    text-decoration: none;
}

.abrechnung-form .add-row:hover {
    background-color: #3a80d2;
}

/* Ausgaben-Tabelle Styles */
.abrechnung-form .expenses-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.abrechnung-form .expenses-table th {
    padding: 10px;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    text-align: left;
    font-weight: 600;
    color: #555;
}

.abrechnung-form .expenses-table td {
    padding: 10px;
    border: 1px solid #ddd;
    vertical-align: top;
}

.abrechnung-form .expenses-total-row {
    background-color: #f9f9f9;
    font-weight: 600;
}

.abrechnung-form .expenses-total {
    font-size: 16px;
    color: #333;
}

/* Submit-Button Styles */
.abrechnung-form .submit-container {
    margin-top: 30px;
    text-align: center;
}

.abrechnung-form .submit-button {
    padding: 10px 20px;
    background-color: #4caf50;
    border: none;
    border-radius: 4px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s;
}

.abrechnung-form .submit-button:hover {
    background-color: #43a047;
}

/* Fehlermeldungen */
.abrechnung-form .has-error input,
.abrechnung-form .has-error select,
.abrechnung-form .has-error textarea,
.abrechnung-form .has-error .abrechnung-signature-pad {
    border-color: #e53935;
}

.abrechnung-form .field-error {
    margin-top: 5px;
    color: #e53935;
    font-size: 13px;
}

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

/* Erfolgsmeldung */
.abrechnung-form-success {
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #c3e6cb;
    border-radius: 4px;
    background-color: #d4edda;
    color: #155724;
}

.abrechnung-form-success h3 {
    margin-top: 0;
    color: #155724;
}

.abrechnung-form-success .pdf-download-link {
    display: inline-block;
    margin-top: 15px;
    padding: 8px 15px;
    background-color: #4a90e2;
    border-radius: 4px;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
}

.abrechnung-form-success .pdf-download-link:hover {
    background-color: #3a80d2;
}

/* Login-Aufforderung */
.abrechnung-login-required {
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #bee5eb;
    border-radius: 4px;
    background-color: #d1ecf1;
    color: #0c5460;
    text-align: center;
}

.abrechnung-login-required .button {
    display: inline-block;
    margin-top: 10px;
    padding: 8px 15px;
    background-color: #4a90e2;
    border-radius: 4px;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
}

.abrechnung-login-required .button:hover {
    background-color: #3a80d2;
}

/* Einreichungsübersicht */
.abrechnung-submissions {
    max-width: 800px;
    margin: 0 auto 30px;
}

.abrechnung-submissions-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.abrechnung-submissions-table th {
    padding: 10px;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    text-align: left;
    font-weight: 600;
    color: #555;
}

.abrechnung-submissions-table td {
    padding: 10px;
    border: 1px solid #ddd;
    vertical-align: middle;
}

.abrechnung-submissions-table .status-submitted {
    color: #856404;
    background-color: #fff3cd;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
}

.abrechnung-submissions-table .status-approved {
    color: #155724;
    background-color: #d4edda;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
}

.abrechnung-submissions-table .status-rejected {
    color: #721c24;
    background-color: #f8d7da;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
}

.abrechnung-submissions-table .status-paid {
    color: #004085;
    background-color: #cce5ff;
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 12px;
}

.abrechnung-submissions-table .download-pdf {
    display: inline-block;
    padding: 5px 10px;
    background-color: #4a90e2;
    border-radius: 3px;
    color: #fff;
    text-decoration: none;
    font-size: 13px;
}

.abrechnung-submissions-table .download-pdf:hover {
    background-color: #3a80d2;
}

.abrechnung-no-submissions {
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #f9f9f9;
    color: #555;
    text-align: center;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .abrechnung-form {
        padding: 15px;
    }
    
    .abrechnung-form .repeater-fields {
        display: block;
        margin: 0;
    }
    
    .abrechnung-form .repeater-field {
        padding: 0;
    }
    
    .abrechnung-submissions-table {
        display: block;
        overflow-x: auto;
    }
}
/* Zusätzliche responsive Anpassungen */
@media (max-width: 480px) {
    .abrechnung-form .form-title {
        font-size: 20px;
    }
    
    .abrechnung-form .section-title {
        font-size: 16px;
    }
    
    .abrechnung-form .submit-button {
        width: 100%;
    }
    
    .abrechnung-form .signature-pad-canvas {
        height: 120px;
    }
}

/* Druckoptimierte Styles */
@media print {
    .abrechnung-form {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .abrechnung-form .submit-container,
    .abrechnung-form .clear-signature,
    .abrechnung-form .add-row,
    .abrechnung-form .remove-row {
        display: none;
    }
    
    .abrechnung-form input[type="text"],
    .abrechnung-form input[type="email"],
    .abrechnung-form input[type="number"],
    .abrechnung-form input[type="tel"],
    .abrechnung-form input[type="date"],
    .abrechnung-form select,
    .abrechnung-form textarea {
        border: none;
        background: transparent;
        padding: 0;
    }
    
    .abrechnung-form .repeater-row {
        break-inside: avoid;
    }
}

/* Tooltip Styles */
.abrechnung-tooltip {
    position: relative;
    display: inline-block;
    margin-left: 5px;
    cursor: help;
}

.abrechnung-tooltip .tooltip-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    background-color: #777;
    color: #fff;
    border-radius: 50%;
    text-align: center;
    line-height: 16px;
    font-size: 12px;
}

.abrechnung-tooltip .tooltip-content {
    visibility: hidden;
    width: 200px;
    background-color: #555;
    color: #fff;
    text-align: center;
    border-radius: 4px;
    padding: 8px;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    margin-left: -100px;
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 12px;
    font-weight: normal;
}

.abrechnung-tooltip .tooltip-content::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: #555 transparent transparent transparent;
}

.abrechnung-tooltip:hover .tooltip-content {
    visibility: visible;
    opacity: 1;
}

/* Fortschrittsanzeige für mehrseitige Formulare */
.abrechnung-form .form-progress {
    margin-bottom: 30px;
}

.abrechnung-form .progress-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
    margin-bottom: 20px;
}

.abrechnung-form .progress-steps::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #ddd;
    z-index: 1;
}

.abrechnung-form .progress-step {
    position: relative;
    z-index: 2;
    text-align: center;
}

.abrechnung-form .step-number {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    margin: 0 auto 10px;
    background-color: #fff;
    border: 2px solid #ddd;
    border-radius: 50%;
    color: #777;
    font-weight: 600;
}

.abrechnung-form .step-title {
    font-size: 13px;
    color: #777;
}

.abrechnung-form .progress-step.active .step-number {
    background-color: #4a90e2;
    border-color: #4a90e2;
    color: #fff;
}

.abrechnung-form .progress-step.active .step-title {
    color: #4a90e2;
    font-weight: 600;
}

.abrechnung-form .progress-step.completed .step-number {
    background-color: #4caf50;
    border-color: #4caf50;
    color: #fff;
}

.abrechnung-form .progress-step.completed .step-title {
    color: #4caf50;
}

/* Mehrseitige Formulare Navigation */
.abrechnung-form .form-navigation {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
}

.abrechnung-form .prev-button,
.abrechnung-form .next-button {
    padding: 8px 15px;
    background-color: #4a90e2;
    border: none;
    border-radius: 4px;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
}

.abrechnung-form .prev-button {
    background-color: #f0f0f0;
    color: #555;
}

.abrechnung-form .prev-button:hover {
    background-color: #e0e0e0;
}

.abrechnung-form .next-button:hover {
    background-color: #3a80d2;
}

/* Animationen */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.abrechnung-form .form-section {
    animation: fadeIn 0.5s ease-in-out;
}

/* Zusätzliche Styling für Datepicker */
.ui-datepicker {
    padding: 10px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    font-size: 14px;
}

.ui-datepicker .ui-datepicker-header {
    padding: 5px 0;
    background-color: #f0f0f0;
    border-bottom: 1px solid #ddd;
    border-radius: 4px 4px 0 0;
}

.ui-datepicker .ui-datepicker-title {
    text-align: center;
    font-weight: 600;
}

.ui-datepicker .ui-datepicker-prev,
.ui-datepicker .ui-datepicker-next {
    position: absolute;
    top: 5px;
    width: 20px;
    height: 20px;
    text-align: center;
    cursor: pointer;
}

.ui-datepicker .ui-datepicker-prev {
    left: 5px;
}

.ui-datepicker .ui-datepicker-next {
    right: 5px;
}

.ui-datepicker .ui-datepicker-calendar {
    width: 100%;
    border-collapse: collapse;
}

.ui-datepicker .ui-datepicker-calendar th {
    padding: 5px;
    text-align: center;
    font-weight: 600;
    color: #555;
}

.ui-datepicker .ui-datepicker-calendar td {
    padding: 2px;
    text-align: center;
}

.ui-datepicker .ui-datepicker-calendar a {
    display: block;
    padding: 5px;
    text-decoration: none;
    color: #333;
    border-radius: 3px;
}

.ui-datepicker .ui-datepicker-calendar a:hover {
    background-color: #f0f0f0;
}

.ui-datepicker .ui-datepicker-calendar .ui-state-active {
    background-color: #4a90e2;
    color: #fff;
}

.ui-datepicker .ui-datepicker-calendar .ui-state-highlight {
    background-color: #fff3cd;
    color: #856404;
}

/* Zusätzliche Styling für Mobilgeräte */
@media (max-width: 600px) {
    .abrechnung-form .progress-steps {
        flex-wrap: wrap;
    }
    
    .abrechnung-form .progress-step {
        flex: 0 0 33.33%;
        margin-bottom: 15px;
    }
    
    .abrechnung-form .progress-steps::before {
        display: none;
    }
    
    .abrechnung-form .expenses-table th,
    .abrechnung-form .expenses-table td {
        padding: 8px 5px;
        font-size: 13px;
    }
    
    .abrechnung-submissions-table th,
    .abrechnung-submissions-table td {
        padding: 8px 5px;
        font-size: 13px;
    }
}

/* File Upload Preview Styles */
.file-preview-list {
    margin-top: 10px;
}

.file-preview-item {
    display: flex;
    align-items: center;
    padding: 10px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin-bottom: 8px;
}

.file-preview-thumb {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 4px;
    margin-right: 10px;
}

.file-preview-icon {
    font-size: 40px;
    margin-right: 10px;
    width: 50px;
    text-align: center;
}

.file-preview-name {
    flex: 1;
    font-weight: 600;
    word-break: break-all;
}

.file-preview-size {
    color: #666;
    font-size: 12px;
    margin-right: 10px;
}

.file-preview-remove {
    background: #dc3545;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
}

.file-preview-remove:hover {
    background: #c82333;
}

/* File Counter Label */
.file-count-label {
    display: none;
    margin: 10px 0;
    padding: 8px 12px;
    background: #28a745;
    color: white;
    border-radius: 4px;
    font-weight: 600;
    font-size: 14px;
    text-align: center;
}
