/* Jablotron Downloads Manager - Frontend Styles */

.jdm-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0;
}

/* Search Section */
.jdm-search-container {
    max-width: 700px;
    margin: 0 auto 40px;
    padding: 0 20px;
}

.jdm-search-box {
    background: white;
    border-radius: 50px;
    padding: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.jdm-search-box:focus-within {
    box-shadow: 0 15px 50px rgba(127, 194, 231, 0.3);
    transform: translateY(-2px);
}

.jdm-search-box input {
    flex: 1;
    border: none;
    padding: 15px 25px;
    font-size: 16px;
    outline: none;
    background: transparent;
}

.jdm-search-box button {
    background: #7FC2E7;
    color: white;
    border: none;
    padding: 15px 35px;
    border-radius: 40px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.jdm-search-box button:hover {
    background: #FFCF00;
    color: #000713;
    transform: scale(1.05);
}

/* Main Layout */
.jdm-main-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
}

/* Sidebar */
.jdm-sidebar {
    background: white;
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    height: fit-content;
    position: sticky;
    top: 20px;
}

.jdm-sidebar h2 {
    color: #000713;
    font-size: 1.4em;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 3px solid #FFCF00;
}

.jdm-category-item {
    padding: 15px;
    margin: 8px 0;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.3s ease;
    border-left: 4px solid transparent;
}

.jdm-category-item:hover {
    background: #f8f9fa;
    border-left-color: #7FC2E7;
    transform: translateX(5px);
}

.jdm-category-item.active {
    background: #e8f4f8;
    border-left-color: #FFCF00;
    font-weight: 600;
}

/* Content Area */
.jdm-content-area {
    background: white;
    border-radius: 15px;
    padding: 35px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    min-height: 500px;
}

.jdm-section-title {
    color: #000713;
    font-size: 2em;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 3px solid #FFCF00;
    animation: jdm-fadeIn 0.5s ease;
}

@keyframes jdm-fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Subcategory */
.jdm-subcategory {
    margin-bottom: 35px;
    animation: jdm-slideUp 0.4s ease;
}

@keyframes jdm-slideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.jdm-subcategory-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    background: #f8f9fa;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    border-left: 5px solid #7FC2E7;
}

.jdm-subcategory-header:hover {
    background: #e8f4f8;
    transform: translateX(5px);
}

.jdm-subcategory-header h3 {
    color: #000713;
    font-size: 1.3em;
    margin: 0;
}

.jdm-toggle-icon {
    color: #7FC2E7;
    font-size: 1.5em;
    transition: transform 0.3s ease;
}

.jdm-subcategory-header.jdm-expanded .jdm-toggle-icon {
    transform: rotate(90deg);
}

/* Documents List */
.jdm-documents-list {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.jdm-documents-list.jdm-expanded {
    max-height: 5000px;
    padding-top: 15px;
}

/* Document Item */
.jdm-document-item {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    margin: 8px 0;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.jdm-document-item:hover {
    border-color: #FFCF00;
    box-shadow: 0 5px 15px rgba(255, 207, 0, 0.2);
    transform: translateY(-2px);
}

.jdm-pdf-icon {
    width: 40px;
    height: 40px;
    background: #d32f2f;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    margin-right: 15px;
    flex-shrink: 0;
    font-size: 0.75em;
}

.jdm-document-info {
    flex: 1;
}

.jdm-document-name {
    color: #000713;
    font-weight: 600;
    margin-bottom: 4px;
}

.jdm-document-size {
    color: #666;
    font-size: 0.9em;
}

.jdm-download-btn {
    width: 40px;
    height: 40px;
    background: #7FC2E7;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2em;
    text-decoration: none;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.jdm-download-btn:hover {
    background: #FFCF00;
    color: #000713;
    transform: scale(1.1);
}

/* View All Button */
.jdm-view-all-btn {
    background: #7FC2E7;
    color: white;
    border: none;
    padding: 10px 25px;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 0.9em;
}

.jdm-view-all-btn:hover {
    background: #FFCF00;
    color: #000713;
    transform: scale(1.05);
}

/* Product List */
.jdm-product-list {
    display: grid;
    gap: 15px;
    margin-top: 20px;
}

.jdm-product-item {
    padding: 15px 25px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.jdm-product-item:hover {
    border-color: #7FC2E7;
    box-shadow: 0 5px 15px rgba(127, 194, 231, 0.2);
    transform: translateX(5px);
}

.jdm-product-item span {
    color: #7FC2E7;
    font-size: 1.2em;
}

/* Breadcrumb */
.jdm-breadcrumb {
    margin-bottom: 25px;
    color: #666;
    font-size: 0.95em;
}

.jdm-breadcrumb a,
.jdm-back-link {
    color: #7FC2E7;
    text-decoration: none;
    transition: color 0.3s ease;
    cursor: pointer;
}

.jdm-breadcrumb a:hover,
.jdm-back-link:hover {
    color: #FFCF00;
}

/* Search Results */
.jdm-no-results {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.jdm-no-results h3 {
    font-size: 1.5em;
    color: #000713;
    margin-bottom: 10px;
}

/* Loading State */
.jdm-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.jdm-loading::after {
    content: '...';
    animation: jdm-dots 1.5s steps(4, end) infinite;
}

@keyframes jdm-dots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60%, 100% { content: '...'; }
}

/* Responsive Design */
@media (max-width: 968px) {
    .jdm-main-wrapper {
        grid-template-columns: 1fr;
    }
    
    .jdm-sidebar {
        position: static;
    }
    
    .jdm-section-title {
        font-size: 1.5em;
    }
    
    .jdm-subcategory-header h3 {
        font-size: 1.1em;
    }
}

@media (max-width: 640px) {
    .jdm-search-box {
        flex-direction: column;
        border-radius: 15px;
    }
    
    .jdm-search-box input {
        width: 100%;
        padding: 12px 20px;
    }
    
    .jdm-search-box button {
        width: 100%;
        margin-top: 8px;
        border-radius: 10px;
    }
    
    .jdm-content-area {
        padding: 20px;
    }
    
    .jdm-document-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .jdm-download-btn {
        align-self: flex-end;
    }
}