/* Removed :root block */

* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

/* Apply base font only if needed, otherwise let theme handle */
/* body {
    font-family: Calibri, 'Gill Sans', 'Gill Sans MT', 'Trebuchet MS', sans-serif;
    background-color: white; 
} */

#container {
    /* Keep ID selectors as they are less likely to conflict */
    position: relative;
}

#container,
#title,
/* Assuming #title is specific enough */
#console {
    /* Keep ID selectors */
    width: 100%;
    max-width: 1024px;
    /* Or adjust based on theme container */
    margin: 0 auto;
}

/* Remove header styles if they are theme-specific */
/* header { ... } */
/* #title { ... } */
/* #title h1 { ... } */

#hint {
    /* Keep ID selectors */
    position: relative;
    min-height: auto;
    /* Adjust height as needed */
    padding: 10px;
    border: 1px solid #eee;
    /* Example border */
    background-color: #f0f0f0;
    /* Example background */
    color: #333;
    /* Example text color */
    margin-bottom: 15px;
    border-radius: 4px;
}

#hinttext {
    margin-top: 0;
    /* Reset margin */
}

#hint h3 {
    margin: 0 0 5px 0;
    font-size: 1.1em;
}

#hint h4 {
    font-weight: normal;
    font-size: 0.9em;
    margin: 0;
}

#buttons {
    /* Keep ID selector for Plupload button container */
    padding: 10px 0 !important;
    display: flex;
    flex-wrap: wrap;
    /* Allow buttons to wrap */
    gap: 10px;
    /* Increase gap slightly */
}

/* Keep media queries for general button font size */
@media screen and (max-width: 768px) {
    #buttons .button {
        /* Target buttons within #buttons */
        font-size: 12px !important;
    }
}

@media screen and (min-width: 768px) {
    #buttons .button {
        /* Target buttons within #buttons */
        font-size: 14px !important;
        /* Slightly smaller base */
    }
}

/* Remove generic button styles if .dt-btn handles it */
/* #buttons button { ... } */

#filelist {
    /* Keep ID selector */
    width: 100%;
    min-height: 100px;
    /* Adjust min-height */
    /* Remove border/background if section handles it */
    /* border: 1px solid transparent; */
    /* background-color: #fff; */
    font-size: 14px;
    /* color: #fff; */
    /* Let text color inherit */
}

/* Remove padding if section handles it */
/* #filelist, #buttons { ... } */

/* --- Card Layout Styles (Prefixed) --- */
.ypu-filelist-cards {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    /* Spacing between cards */
    padding: 10px 0;
    /* Padding top/bottom */
}

.ypu-file-card {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    /* Stack elements vertically */
    width: calc(50% - 10px);
    /* Two cards per row on larger screens, adjust gap */
    position: relative;
    /* For positioning the delete button */
    overflow: hidden;
    /* Ensure content stays within rounded corners */
    box-sizing: border-box;
}

.ypu-file-card-preview {
    height: 120px;
    /* Fixed height for preview area */
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8f8f8;
    border-bottom: 1px solid #eee;
}

.ypu-file-card-preview img {
    max-width: 100%;
    max-height: 100%;
    display: block;
}

.ypu-file-card-details {
    padding: 10px;
    flex-grow: 1;
    /* Allow details section to grow */
    display: flex;
    flex-direction: column;
    gap: 8px;
    /* Spacing within details */
}

.ypu-file-card-name {
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 0.9em;
    margin-bottom: 4px;
    /* Space below name */
}

.ypu-file-card-size {
    font-size: 0.8em;
    color: #666;
    margin-bottom: 8px;
    /* Space below size */
}

.ypu-file-card-inputs p {
    margin: 5px 0 0 0;
}

.ypu-file-card-inputs label {
    display: block;
    font-size: 0.8em;
    margin-bottom: 2px;
    color: #555;
}

.ypu-file-card-inputs input[type="text"] {
    width: 100%;
    padding: 6px;
    border: 1px solid #ccc;
    border-radius: 3px;
    font-size: 0.9em;
    box-sizing: border-box;
    /* Include padding in width */
}

.ypu-file-card-status {
    margin-top: 8px;
    /* Space above status */
    font-size: 0.8em;
    display: flex;
    align-items: center;
    gap: 5px;
    min-height: 1.5em;
    /* Ensure space for status text/icon */
}

.ypu-file-card-actions {
    position: absolute;
    top: 5px;
    right: 5px;
    z-index: 1;
    /* Ensure it's above other content */
}

.ypu-file-card-actions .delete {
    /* Target delete link within actions */
    display: inline-block;
    background-color: rgba(200, 0, 0, 0.7);
    /* Slightly less intense red */
    color: white !important;
    /* Ensure white text */
    border-radius: 50%;
    width: 22px;
    /* Slightly larger */
    height: 22px;
    line-height: 22px;
    /* Center the 'X' */
    text-align: center;
    font-weight: bold;
    text-decoration: none;
    font-size: 14px;
    opacity: 0.7;
    /* Start slightly transparent */
    transition: opacity 0.2s ease, background-color 0.2s ease;
    border: 1px solid rgba(0, 0, 0, 0.1);
    /* Subtle border */
}

.ypu-file-card-actions .delete:hover {
    background-color: rgba(200, 0, 0, 1);
    opacity: 1;
}


.deletePic {
    display: none;
}

/* Hide old image delete if still referenced */
.picOk {
    /* Keep original class for JS compatibility */
    width: 1.1em;
    /* Adjust size as needed */
    height: 1.1em;
    vertical-align: middle;
}

.progressBorder {
    /* Keep original class for JS compatibility */
    display: inline-block;
    width: 100%;
    /* Make progress bar container full width */
    max-width: 150px;
    /* Limit max width */
    height: 10px;
    margin-right: 6px;
    border: 1px solid #ccc;
    /* Use theme border color */
    background-color: #eee;
    /* Light background */
    border-radius: 5px;
    overflow: hidden;
    /* Hide overflow */
}

.progress {
    /* Keep original class for JS compatibility */
    width: 1%;
    height: 100%;
    background: linear-gradient(to bottom, #01ff42, #04d832 70%, #0ac440);
    /* Replaced var(--backgroundProgress) */
    border-radius: 5px;
    /* Match container */
    transition: width 0.3s ease;
    /* Smooth progress */
}

/* --- Responsive Card Styles --- */
@media screen and (max-width: 767px) {
    .ypu-file-card {
        width: 100%;
        /* Full width cards on smaller screens */
        gap: 5px;
        /* Reduce gap for smaller cards */
    }

    .ypu-file-card-preview {
        height: 100px;
        /* Smaller preview */
    }

    #buttons {
        flex-direction: column;
        /* Stack buttons vertically */
        gap: 10px;
    }

    #buttons .button {
        /* Assumes .button is generic or theme */
        width: 100%;
        /* Make buttons full width */
        text-align: center;
    }

    #submit_section .button {
        /* Assumes .button is generic or theme */
        width: 100%;
        /* Make submit button full width */
        text-align: center;
    }
}

@media screen and (min-width: 768px) and (max-width: 991px) {
    .ypu-file-card {
        width: calc(50% - 10px);
        /* Two columns */
    }
}

@media screen and (min-width: 992px) {
    .ypu-file-card {
        width: calc(33.333% - 10px);
        /* Three columns */
    }
}


/* --- Console Message Styling --- */
#console {
    /* Keep ID selector */
    border: 1px solid #eee;
    background-color: #f9f9f9;
    margin-top: 1em;
    max-height: 150px;
    /* Limit height and allow scrolling */
    overflow-y: auto;
    color: #333;
    padding: 0;
    /* Remove padding from ul */
    border-radius: 4px;
}

#console li {
    padding: 8px 12px;
    /* Increase padding */
    border-bottom: 1px dotted #eee;
    margin: 0;
    list-style-type: none;
    font-size: 0.9em;
    /* Adjust font size */
}

#console li:last-child {
    border-bottom: none;
}

/* Use more specific selectors if possible, but style attribute targeting is fallback */
#console li[style*="color:red"] {
    background-color: #ffebee;
    color: #c62828 !important;
    /* Darker red for better readability, !important if needed */
    font-weight: bold;
}

#console li[style*="color:darkgreen"] {
    background-color: #e8f5e9;
    color: #2e7d32 !important;
    /* Darker green */
}

#console li[style*="color:orange"] {
    background-color: #fff3e0;
    color: #ef6c00 !important;
    /* Darker orange */
}

#console li[style*="font-weight:bold"] {
    /* Style for generic bold messages if needed */
}


/* --- General Input Styling (within uploader scope) --- */
/* Prefix form field container if it exists, otherwise target inputs directly */
#form_fields input[type="text"],
#form_fields input[type="email"],
#form_fields textarea {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 3px;
    margin-top: 5px;
    width: 100%;
    /* Ensure full width */
    box-sizing: border-box;
}

#form_fields label {
    font-weight: bold;
    display: inline-block;
    /* Ensure label is block or inline-block */
    margin-bottom: 3px;
    /* Add space below label */
}

/* --- Button Consistency (Using .dt-btn as potentially theme-related) --- */
/* Only add overrides if needed */
.button.dt-btn {
    /* display: inline-block; */
    /* Already likely set by theme */
    /* padding: 10px 15px; */
    /* Let theme control padding */
    /* border: 1px solid #ccc; */
    /* Let theme control border */
    /* border-radius: 4px; */
    /* Let theme control radius */
    /* background-color: #f0f0f0; */
    /* Let theme control background */
    /* color: #333; */
    /* Let theme control color */
    /* text-decoration: none; */
    /* cursor: pointer; */
    /* transition: background-color 0.2s ease; */
}

/* Style specific buttons if needed */
#btnSubmitEinreichung {
    background-color: #4CAF50 !important;
    /* Green, use !important if needed to override theme */
    color: white !important;
    border-color: #4CAF50 !important;
}

#btnSubmitEinreichung:hover:not([disabled]) {
    background-color: #45a049 !important;
}

/* --- Section Styling (Prefixed) --- */
.ypu-upload-section {
    background-color: #f9f9f9;
    /* Light background for sections */
    border: 1px solid #eee;
    padding: 20px;
    /* Increase padding */
    margin-top: 25px;
    /* Increase margin */
    border-radius: 5px;
}

.ypu-upload-section h2 {
    margin-top: 0;
    margin-bottom: 20px;
    /* Increase space below heading */
    font-size: 1.3em;
    /* Slightly larger heading */
    color: #333;
    border-bottom: 1px solid #ddd;
    /* Slightly darker border */
    padding-bottom: 10px;
}

/* Adjust spacing for buttons moved under filelist */
.ypu-media-section #buttons {
    margin-top: 20px;
    /* Increase space above buttons */
    padding-left: 0;
    /* Reset padding if needed */
    padding-right: 0;
    border-top: 1px solid #eee;
    /* Add separator */
    padding-top: 15px;
    /* Space above buttons */
}

/* Adjust spacing for submit button */
.ypu-details-section #submit_section {
    margin-top: 20px;
    text-align: right;
    /* Align submit button right */
    border-top: 1px solid #eee;
    /* Add separator */
    padding-top: 15px;
    /* Space above button */
}

/* Ensure submit button takes appropriate width */
.ypu-details-section #submit_section .button.dt-btn {
    /* Be specific */
    width: auto;
    /* Override potential full width from mobile styles */
    display: inline-block;
    padding: 12px 20px;
    /* Larger padding */
    font-size: 1em;
    /* Adjust font size */
}

/* Responsive adjustments for sections */
@media screen and (max-width: 767px) {
    .ypu-upload-section {
        padding: 15px;
        /* Adjust padding */
    }

    .ypu-upload-section h2 {
        font-size: 1.2em;
        /* Adjust heading size */
        margin-bottom: 15px;
    }

    .ypu-details-section #submit_section {
        text-align: center;
        /* Center submit button on mobile */
        padding-top: 15px;
    }

    .ypu-details-section #submit_section .button.dt-btn {
        width: 100%;
        /* Make submit full width on mobile */
    }

    .ypu-media-section #buttons {
        padding-top: 15px;
    }
}