/* Protected PDF Downloads - Styles */

/* ========== SINGLE PDF FORM ========== */

.protected-pdf-wrapper {
    max-width: 600px;
    margin: 30px auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.pdf-form-container {
    background: #ffffff;
    border: 1px solid #e0e0e0;

    padding: 30px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.pdf-form-container h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 24px;
    font-weight: 600;
}

.pdf-form-container > p {
    margin: 0 0 25px 0;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

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

.pdf-download-form .form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 0;
}

.pdf-download-form .form-group-half {
    flex: 1;
    min-width: 0;
}

.pdf-download-form label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
    font-size: 14px;
}

#pdf-search {
background: #fff;
}

.pdf-download-form input[type="text"],
.pdf-download-form input[type="email"] {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;

    font-size: 15px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.pdf-download-form input[type="text"]:focus,
.pdf-download-form input[type="email"]:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 0 1px #0073aa;
}

.pdf-download-form input[type="checkbox"] {
    margin-right: 8px;
    cursor: pointer;
}

.pdf-download-form label:has(input[type="checkbox"]) {
    display: flex;
    align-items: flex-start;
    font-weight: normal;
    font-size: 13px;
    color: #666;
    cursor: pointer;
}

.pdf-submit-btn {
    width: 100%;
    padding: 14px 20px;
    background-color: #ce0058;
    color: #ffffff;
    border: none;

    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;
    margin-top: 10px;
}

.pdf-submit-btn:hover {
    background-color: #000000;
}

.pdf-submit-btn:active {
    transform: scale(0.98);
}

.pdf-submit-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
    opacity: 0.6;
}

.form-message {
    margin: 15px 0;
    padding: 12px 15px;

    font-size: 14px;
    display: none;
}

.form-message:not(:empty) {
    display: block;
}

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

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

/* ========== ARCHIVE FILTERS ========== */

.pdf-archive-filters {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;

    padding: 25px;
    margin-bottom: 30px;
}

.pdf-search-box {
    margin-bottom: 20px;
}

.pdf-search-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;

    font-size: 15px;
    box-sizing: border-box;

}

.pdf-search-input:focus {
    outline: none;
    border-color: #0073aa;
}

.pdf-filter-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
}

.pdf-filter-group {
    flex: 1 1 200px;
    min-width: 200px;
}

.pdf-filter-group label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    font-size: 14px;
    color: #333;
}

.pdf-filter-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;

    font-size: 14px;
    background: white;
    cursor: pointer;
}

.pdf-reset-filters {
    padding: 10px 20px;
    background: #666;
    color: white;
    border: none;

    cursor: pointer;
    font-size: 14px;
    white-space: nowrap;
    transition: background 0.3s ease;
}

.pdf-reset-filters:hover {
    background: #555;
}

/* ========== ARCHIVE GRID ========== */

.pdf-archive-results {
    position: relative;
    min-height: 200px;
}

.pdf-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10;
}

.pdf-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0073aa;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

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

.pdf-archive-grid {
    display: grid;
    gap: 25px;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

.pdf-archive-grid[data-columns="2"] {
    grid-template-columns: repeat(auto-fill, minmax(45%, 1fr));
}

.pdf-archive-grid[data-columns="3"] {
    grid-template-columns: repeat(auto-fill, minmax(30%, 1fr));
}

.pdf-archive-grid[data-columns="4"] {
    grid-template-columns: repeat(auto-fill, minmax(22%, 1fr));
}

.pdf-archive-item {
    background: white;
    border: 1px solid #e0e0e0;

    overflow: hidden;
    transition: box-shadow 0.3s ease, transform 0.2s ease;
}

.pdf-archive-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.pdf-item-thumbnail {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #f5f5f5;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pdf-item-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pdf-default-thumbnail {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.pdf-default-thumbnail .dashicons {
    font-size: 80px;
    width: 80px;
    height: 80px;
    color: white;
    opacity: 0.8;
}

.pdf-item-content {
    
}

.pdf-item-title {
    margin: 0 0 12px 0;
padding: 20px 20px 0px 20px;
    font-size: 18px;
    font-weight: 600;
    color: #333;
    line-height: 1.4;
}

.pdf-item-excerpt {
    margin-bottom: 15px;
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

.pdf-item-meta {
    display: flex;
    flex-wrap: wrap;
padding: 0 20px 20px 20px ;
    gap: 10px;

    font-size: 13px;
    color: #777;
}

.pdf-item-categories {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.pdf-category-badge {
    display: inline-block;
    padding: 4px 10px;
    background: #e3f2fd;
    color: #1976d2;

    font-size: 12px;
    font-weight: 500;
}

.pdf-file-size,
.pdf-download-count {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.pdf-file-size .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.pdf-archive-download-btn {
    width: 100%;
    padding: 12px 20px;
    background: #f18700;
    color: white;
    border: none;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.pdf-archive-download-btn:hover {
    background: #000000;
}

.pdf-no-results {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    font-size: 16px;
}

/* ========== MODAL ========== */

.pdf-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 99999;
}

.pdf-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
}

.pdf-modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;

    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.pdf-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: #999;
    transition: color 0.3s ease;
    z-index: 10;
}

.pdf-modal-close:hover {
    color: #333;
}

.pdf-modal-body {
    padding: 30px;
}

.pdf-modal-title {
    margin: 0 0 10px 0;
    font-size: 22px;
    font-weight: 600;
    color: #333;
}

body.pdf-modal-open {
    overflow: hidden;
}

/* ========== RESPONSIVE ========== */

@media (max-width: 992px) {
    .pdf-archive-grid[data-columns="3"],
    .pdf-archive-grid[data-columns="4"] {
        grid-template-columns: repeat(auto-fill, minmax(45%, 1fr));
    }
}

@media (max-width: 768px) {
    .protected-pdf-wrapper {
        margin: 20px 15px;
    }
    
    .pdf-form-container {
        padding: 20px;
    }
    
    .pdf-form-container h3 {
        font-size: 20px;
    }
    
    .pdf-download-form .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .pdf-archive-filters {
        padding: 20px;
    }
    
    .pdf-filter-controls {
        flex-direction: column;
    }
    
    .pdf-filter-group {
        width: 100%;
    }
    
    .pdf-reset-filters {
        width: 100%;
    }
    
    .pdf-archive-grid,
    .pdf-archive-grid[data-columns="2"],
    .pdf-archive-grid[data-columns="3"],
    .pdf-archive-grid[data-columns="4"] {
        grid-template-columns: 1fr;
    }
    
    .pdf-modal-content {
        width: 95%;
    }
    
    .pdf-modal-body {
        padding: 20px;
    }
}

/* Animation beim Laden */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.pdf-form-container,
.pdf-archive-item {
    animation: fadeIn 0.4s ease-out;
}

/* Placeholder-Styling */
.pdf-download-form input::placeholder,
.pdf-search-input::placeholder {
    color: #999;
    opacity: 1;
}

