/* PDF Store CSS */

/* Container */
.pdf-upload-container,
.pdf-store-container,
.my-pdfs-container {
    background: #111b21;
    border-radius: 12px;
    padding: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Header */
.pdf-upload-header,
.pdf-store-header,
.my-pdfs-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #00a884;
}

.pdf-upload-header h2,
.pdf-store-header h2,
.my-pdfs-header h2 {
    color: #e9edef;
    font-size: 28px;
    margin: 0 0 10px 0;
}

.pdf-upload-header h2 i,
.pdf-store-header h2 i,
.my-pdfs-header h2 i {
    color: #00a884;
    margin-right: 10px;
}

.pdf-upload-header p,
.my-pdfs-header p {
    color: #8696a0;
    margin: 0;
}

.pdf-store-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pdf-store-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-icon-round {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #00a884;
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-icon-round:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 168, 132, 0.4);
}

.pdf-store-balance {
    background: #202c33;
    padding: 10px 20px;
    border-radius: 20px;
    color: #00a884;
    font-size: 18px;
    font-weight: bold;
}

.pdf-store-balance i {
    margin-right: 8px;
}

/* Upload Form */
.pdf-upload-form-wrapper {
    background: #202c33;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    color: #e9edef;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-group label i {
    color: #00a884;
    margin-right: 8px;
}

.form-group input[type="text"],
.form-group input[type="number"],
.form-group textarea {
    width: 100%;
    padding: 12px 15px;
    background: #111b21;
    border: 1px solid #2a3942;
    border-radius: 8px;
    color: #e9edef;
    font-size: 15px;
    transition: all 0.3s;
    font-family: inherit;
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.form-group input[type="text"]:focus,
.form-group input[type="number"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #00a884;
    box-shadow: 0 0 0 3px rgba(0, 168, 132, 0.1);
}

/* File Upload */
.file-upload-wrapper {
    position: relative;
}

.file-upload-wrapper input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 2;
}

.file-upload-info {
    background: #111b21;
    border: 2px dashed #2a3942;
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    transition: all 0.3s;
}

.file-upload-wrapper:hover .file-upload-info {
    border-color: #00a884;
    background: rgba(0, 168, 132, 0.05);
}

.file-upload-info i {
    font-size: 48px;
    color: #00a884;
    margin-bottom: 15px;
    display: block;
}

.file-upload-text {
    display: block;
    color: #e9edef;
    font-size: 16px;
    margin-bottom: 8px;
}

.file-upload-limit {
    display: block;
    color: #8696a0;
    font-size: 13px;
}

/* Buttons */
.btn-upload-pdf {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #00a884 0%, #06cf9c 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-upload-pdf:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 168, 132, 0.4);
}

.btn-upload-pdf i {
    margin-right: 8px;
}

/* pdf List */
.pdf-list,
.pdf-store-list,
.my-pdfs-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.pdf-item {
    background: #202c33;
    border-radius: 10px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s;
    min-width: 0;
}

.pdf-item:hover {
    background: #2a3942;
    transform: translateX(5px);
}

.pdf-info {
    display: flex;
    align-items: center;
    gap: 15px;
    flex: 1;
    min-width: 0;
}

.pdf-thumbnail {
    width: 120px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
}

/* PDF Cover (gleiche Styles wie thumbnail) */
.pdf-cover {
    width: 120px;
    height: 80px;
    border-radius: 8px;
    overflow: hidden;
    flex-shrink: 0;
    position: relative;
}

.pdf-thumbnail img,
.pdf-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pdf-thumbnail-placeholder,
.pdf-cover-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #00a884 0%, #06cf9c 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: white;
}

.pdf-page-count {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.85);
    color: #ffffff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    z-index: 2;
}

.pdf-page-count i {
    margin-right: 4px;
    font-size: 10px;
}

.pdf-play-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    color: white;
    opacity: 0;
    transition: opacity 0.3s;
}

.pdf-thumbnail:hover .pdf-play-overlay {
    opacity: 1;
}

.pdf-details {
    flex: 1;
}

.pdf-title {
    color: #e9edef;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 5px;
}

.pdf-category {
    color: #8696a0;
    font-size: 13px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.pdf-category i {
    font-size: 12px;
}

.pdf-description {
    color: #667781;
    font-size: 13px;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.pdf-author-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pdf-author-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.pdf-author-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pdf-author-name {
    color: #8696a0;
    font-size: 13px;
}

.pdf-duration {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.85);
    color: #ffffff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    font-family: monospace;
    z-index: 2;
}

.pdf-duration i {
    margin-right: 4px;
    font-size: 10px;
}

.pdf-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: auto;
    flex-shrink: 0;
}

.pdf-price {
    background: #111b21;
    padding: 8px 15px;
    border-radius: 20px;
    color: #00a884;
    font-weight: 600;
    white-space: nowrap;
}

.pdf-price i {
    margin-right: 5px;
}

.btn-edit-pdf,
.btn-delete-pdf,
.btn-buy-pdf,
.btn-watch-pdf,
.btn-play-pdf,
.btn-view-pdf {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-edit-pdf {
    background: #00a884;
    color: white;
}

.btn-edit-pdf:hover {
    background: #06cf9c;
    transform: scale(1.05);
}

.btn-delete-pdf {
    background: #dc2626;
    color: white;
}

.btn-delete-pdf:hover {
    background: #b91c1c;
    transform: scale(1.05);
}

.btn-buy-pdf {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    background: #00a884;
    color: white;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-buy-pdf:hover {
    background: #06cf9c;
    transform: scale(1.05);
}

.btn-watch-pdf,
.btn-play-pdf,
.btn-view-pdf {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    background: #00a884;
    color: white;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-watch-pdf:hover,
.btn-play-pdf:hover,
.btn-view-pdf:hover {
    background: #06cf9c;
    transform: scale(1.05);
}

.pdf-purchased-badge {
    background: #00a884;
    color: white;
    padding: 8px 15px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.pdf-purchased-badge i {
    margin-right: 5px;
}

.pdf-purchased-date {
    color: #8696a0;
    font-size: 12px;
    margin-top: 5px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.pdf-purchased-date i {
    font-size: 11px;
}

/* Filters */
.pdf-store-filters,
.my-pdfs-filters {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.pdf-search {
    flex: 1;
    position: relative;
    min-width: 250px;
}

.pdf-search i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #8696a0;
}

.pdf-search input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    background: #202c33;
    border: 1px solid #2a3942;
    border-radius: 8px;
    color: #e9edef;
    font-size: 15px;
}

.pdf-search input:focus {
    outline: none;
    border-color: #00a884;
}

.pdf-sort {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pdf-sort label {
    color: #8696a0;
    font-size: 14px;
    white-space: nowrap;
}

.pdf-sort select {
    padding: 12px 15px;
    background: #202c33;
    border: 1px solid #2a3942;
    border-radius: 8px;
    color: #e9edef;
    font-size: 15px;
    cursor: pointer;
}

.pdf-sort select:focus {
    outline: none;
    border-color: #00a884;
}

/* Loading */
.pdf-loading {
    text-align: center;
    padding: 60px 20px;
    color: #8696a0;
    font-size: 18px;
}

.pdf-loading i {
    font-size: 48px;
    margin-bottom: 15px;
    display: block;
    color: #00a884;
}

/* Empty State */
.pdf-empty {
    text-align: center;
    padding: 60px 20px;
    color: #8696a0;
}

.pdf-empty i {
    font-size: 64px;
    margin-bottom: 20px;
    display: block;
    color: #2a3942;
}

.pdf-empty h3 {
    color: #e9edef;
    margin-bottom: 10px;
}

/* Current Thumbnail Preview */
.current-thumbnail-preview {
    margin-bottom: 15px;
}

.current-thumbnail {
    background: #202c33;
    padding: 15px;
    border-radius: 8px;
}

.current-thumbnail p {
    color: #8696a0;
    margin: 0 0 10px 0;
    font-size: 13px;
}

.current-thumbnail img {
    max-width: 200px;
    border-radius: 8px;
}

/* Responsive */
@media (max-width: 768px) {
    .pdf-upload-container,
    .pdf-store-container,
    .my-pdfs-container {
        padding: 20px;
    }
    
    .pdf-store-header {
        flex-direction: column;
        gap: 15px;
    }
    
    .pdf-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .pdf-store-filters,
    .my-pdfs-filters {
        flex-direction: column;
    }
    
    .pdf-search {
        width: 100%;
    }
    
    .pdf-thumbnail {
        width: 100%;
        height: 200px;
    }
}

/* pdf Player Modal */
.pdf-player-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.pdf-player-container {
    max-width: 1200px;
    width: 100%;
    position: relative;
}

.pdf-player-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: transparent;
    border: none;
    color: white;
    font-size: 32px;
    cursor: pointer;
    transition: all 0.3s;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pdf-player-close:hover {
    color: #00a884;
    transform: scale(1.2);
}

.pdf-player-wrapper {
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.pdf-player-wrapper pdf {
    width: 100%;
    height: auto;
    display: block;
    position: relative;
    z-index: 1;
    opacity: 1 !important;
    visibility: visible !important;
}

.pdf-player-wrapper pdf:hover {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Verstecke Bild-in-Bild Button */
.pdf-player-wrapper pdf::-webkit-media-controls-picture-in-picture-button {
    display: none !important;
}

.pdf-player-wrapper pdf::-webkit-media-controls-fullscreen-button {
    display: none !important;
}

/* Verhindere dass Controls das pdf überlagern */
.pdf-player-wrapper pdf::-webkit-media-controls-enclosure {
    background: transparent !important;
}

.pdf-player-wrapper pdf::-webkit-media-controls-panel {
    background: rgba(0, 0, 0, 0.5) !important;
}

.pdf-player-info {
    background: #111b21;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.pdf-player-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
}

.pdf-player-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pdf-player-details {
    flex: 1;
}

.pdf-player-title {
    color: #e9edef;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
}

.pdf-player-author {
    color: #8696a0;
    font-size: 14px;
}

/* Modal */
.peteitcms-pdf-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99999;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.peteitcms-pdf-modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.peteitcms-pdf-modal {
    background: #111b21;
    border-radius: 16px;
    padding: 40px 30px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.peteitcms-pdf-modal-overlay.active .peteitcms-pdf-modal {
    transform: scale(1);
}

.peteitcms-pdf-modal-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.peteitcms-pdf-modal-title {
    font-size: 24px;
    font-weight: 700;
    color: #e9edef;
    margin-bottom: 15px;
}

.peteitcms-pdf-modal-message {
    font-size: 16px;
    color: #8696a0;
    margin-bottom: 30px;
    line-height: 1.5;
}

.peteitcms-pdf-modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.peteitcms-pdf-modal-btn {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
}

.peteitcms-pdf-modal-btn-confirm {
    background: linear-gradient(135deg, #00a884 0%, #06cf9c 100%);
    color: white;
}

.peteitcms-pdf-modal-btn-confirm:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 168, 132, 0.4);
}

.peteitcms-pdf-modal-btn-cancel {
    background: #202c33;
    color: #e9edef;
    border: 2px solid #2a3942;
}

.peteitcms-pdf-modal-btn-cancel:hover {
    background: #2a3942;
    border-color: #00a884;
}

/* Upload Modal */
.peteitcms-pdf-upload-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.peteitcms-pdf-upload-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
}

.peteitcms-pdf-upload-modal-content {
    position: relative;
    background: #111b21;
    border-radius: 16px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.peteitcms-pdf-upload-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 30px;
    border-bottom: 1px solid #2a3942;
}

.peteitcms-pdf-upload-modal-header h2 {
    margin: 0;
    color: #e9edef;
    font-size: 24px;
}

.peteitcms-pdf-upload-modal-close {
    background: none;
    border: none;
    color: #8696a0;
    font-size: 24px;
    cursor: pointer;
    padding: 5px 10px;
    transition: color 0.2s;
}

.peteitcms-pdf-upload-modal-close:hover {
    color: #e9edef;
}

.peteitcms-pdf-upload-modal-body {
    overflow-y: auto;
    padding: 30px;
}

.peteitcms-pdf-upload-modal-body .pdf-upload-header {
    display: none;
}

.peteitcms-pdf-upload-modal-body .pdf-upload-container {
    background: transparent;
    padding: 0;
}

/* Category Select Wrapper */
.category-select-wrapper {
    display: flex;
    gap: 10px;
    align-items: center;
}

.category-select-wrapper select {
    flex: 1;
}

.category-select-wrapper .btn-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: #00a884;
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.category-select-wrapper .btn-icon:hover {
    background: #06cf9c;
    transform: scale(1.05);
}

/* Create Category Button */
.btn-create-category-submit {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #00a884 0%, #06cf9c 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-create-category-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 168, 132, 0.4);
}

.btn-create-category-submit i {
    margin-right: 8px;
}

@media (max-width: 480px) {
    .peteitcms-pdf-modal {
        padding: 30px 20px;
    }
    
    .peteitcms-pdf-modal-buttons {
        flex-direction: column;
    }
    
    .peteitcms-pdf-modal-btn {
        width: 100%;
    }
}
