/**
 * HOA Document Manager Public Styles
 * Version: 1.0.0
 */

/* Global Styles
------------------------------------------ */
:root {
    --primary-color: #2271b1;
    --error-color: #dc3232;
    --success-color: #46b450;
    --border-color: #ddd;
    --text-color: #333;
    --light-bg: #f9f9f9;
    --hover-bg: #f0f0f1;
    --shadow: 0 2px 4px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}



/* Upload Form - First Version
------------------------------------------ 
.hoa-upload-form-container {
    max-width: 800px;
    margin: 20px auto;
    padding: 20px;
    background: #fff;
    border-radius: 8px;
    box-shadow: var(--shadow);
}
*/
/* Drop Zone */
/*
.hoa-drop-zone {
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 40px 20px;
    text-align: center;
    background: var(--light-bg);
    transition: var(--transition);
    cursor: pointer;
}

.hoa-drop-zone.drag-active {
    border-color: var(--primary-color);
    background: rgba(34, 113, 177, 0.05);
    transform: scale(1.01);
}

.drop-zone-content {
    color: var(--text-color);
}

.drop-zone-content .dashicons {
    font-size: 48px;
    width: 48px;
    height: 48px;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.drop-zone-content h3 {
    margin: 0 0 10px;
    font-size: 1.4em;
    color: var(--text-color);
}

.select-files-btn {
    display: inline-block;
    padding: 10px 20px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 1em;
    cursor: pointer;
    transition: var(--transition);
    margin: 15px 0;
}

.select-files-btn:hover {
    background: #135e96;
    transform: translateY(-1px);
}
*/
/* Upload Form - 2nd version
------------------------------------------ */

.hoa-drop-zone {
    border: 2px dashed #ccc;
    border-radius: 4px;
    padding: 20px;
    text-align: center;
    background: #f9f9f9;
    transition: all 0.3s ease;
    margin-bottom: 15px;
}

.hoa-drop-zone.drag-active {
    border-color: #4CAF50;
    background: #e8f5e9;
}

.drop-zone-content {
    min-height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.drop-message {
    margin-bottom: 15px;
    color: #666;
}

.selected-file {
    display: flex;
    align-items: center;
    padding: 8px;
    background: #f5f5f5;
    margin: 5px 0;
    border-radius: 4px;
}

.selected-file .file-name {
    flex-grow: 1;
}

.selected-file .file-size {
    margin: 0 10px;
    color: #666;
}

.remove-file {
    background: #ff5252;
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.remove-file:hover {
    background: #ff1744;
}

/* File List */
.hoa-file-list {
    margin-top: 20px;
}

.hoa-file-item {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: var(--transition);
}

.hoa-file-item:hover {
    box-shadow: var(--shadow);
}

.file-info {
    flex: 1;
}

.file-name {
    display: block;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 5px;
}

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

/* Progress Bar */
.file-progress {
    width: 200px;
}

.progress-bar {
    height: 8px;
    background: var(--light-bg);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 5px;
}

.progress-bar-fill {
    height: 100%;
    background: var(--primary-color);
    width: 0;
    transition: width 0.3s ease-in-out;
}

.progress-text {
    font-size: 0.8em;
    color: #666;
    text-align: center;
}

/* Document List
------------------------------------------ */
.hoa-documents-list {
    margin: 20px 0;
}

.hoa-documents-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: #fff;
    border-radius: 6px;
    box-shadow: var(--shadow);
}

/* Search and Sort */
.hoa-search {
    flex: 1;
    max-width: 300px;
}

.hoa-document-search {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
}

.hoa-sort-select {
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
}

/* Document Grid */
.hoa-documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.hoa-document-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 20px;
    transition: var(--transition);
}

.hoa-document-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.document-icon, .folder-icon {
    text-align: center;
    color: var(--primary-color);
    
}

.document-icon .dashicons {
    font-size: 40px;
    width: 40px;
    height: 40px;
    color: var(--primary-color);
}

.document-info {
    margin-bottom: 15px;
}

.document-title {
    margin: 0 0 10px;
    font-size: 1.1em;
    color: var(--text-color);
}

.document-description {
    color: #666;
    font-size: 0.9em;
    margin: 0 0 10px;
}

.document-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85em;
    color: #666;
}

/* Download Button */
.document-actions {
    text-align: center;
}

.hoa-download-button {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    background: var(--primary-color);
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    transition: var(--transition);
}

.hoa-download-button:hover {
    background: #135e96;
    color: #fff;
    transform: translateY(-1px);
}

.hoa-download-button .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

/* Folder Tree
------------------------------------------ */
.hoa-folder-tree {
    background: #fff;
    border-radius: 8px;
    box-shadow: var(--shadow);
    padding: 15px;
    margin-bottom: 20px;
}

.folder-tree-header {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.folder-tree-header h3 {
    margin: 0;
    color: var(--text-color);
}

.hoa-folder-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.hoa-folder-item {
    margin: 5px 0;
}

.hoa-folder-item.active > .hoa-folder-link {
    background: rgba(34, 113, 177, 0.1);
    color: var(--primary-color);
}

.folder-toggle {
    background: none;
    border: none;
    padding: 4px;
    cursor: pointer;
    color: #666;
}

.hoa-folder-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    text-decoration: none;
    color: var(--text-color);
    border-radius: 4px;
    transition: var(--transition);
}

.hoa-folder-link:hover {
    background: var(--hover-bg);
}

.folder-name {
    flex: 1;
}

.doc-count {
    font-size: 0.85em;
    color: #666;
}

/* Messages
------------------------------------------ */
.hoa-message {
    padding: 12px 15px;
    margin: 10px 0;
    border-radius: 4px;
    font-size: 0.9em;
}

.hoa-message-success {
    background: #ecf7ed;
    color: var(--success-color);
    border: 1px solid #c3e6cb;
}

.hoa-message-error {
    background: #f8d7da;
    color: var(--error-color);
    border: 1px solid #f5c6cb;
}

/* Pagination
------------------------------------------ */
.hoa-pagination {
    margin-top: 30px;
    text-align: center;
}

.hoa-pagination .page-numbers {
    display: inline-block;
    padding: 8px 12px;
    margin: 0 2px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    text-decoration: none;
    color: var(--text-color);
    transition: var(--transition);
}

.hoa-pagination .page-numbers.current {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.hoa-pagination .page-numbers:hover:not(.current) {
    background: var(--hover-bg);
}

.hoa-doc-actions {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.hoa-doc-action {
    cursor: pointer;
    padding: 5px;
    border: none;
    background: none;
    color: #555;
    transition: color 0.3s ease;
}

.hoa-doc-download:hover {
    color: #0073aa;
}

.hoa-doc-delete:hover {
    color: #dc3232;
}

/* Responsive Design
------------------------------------------ */
@media screen and (max-width: 768px) {
    .hoa-documents-header {
        flex-direction: column;
        gap: 15px;
    }

    .hoa-search {
        max-width: 100%;
    }

    .hoa-documents-grid {
        grid-template-columns: 1fr;
    }

    .hoa-file-item {
        flex-direction: column;
        text-align: center;
    }

    .file-progress {
        width: 100%;
    }
}

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

.hoa-document-card {
    animation: fadeIn 0.3s ease-in-out;
}

/* Card View (existing styles) */
.hoa-documents-wrapper.display-card .hoa-documents-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

/* Grid View */
.hoa-documents-wrapper.display-grid .hoa-documents-grid {
    width: 100%;
    border-collapse: collapse;
}

.hoa-documents-grid th,
.hoa-documents-grid td {
    padding: 10px;
    border-bottom: 1px solid #eee;
}

/* List View */
.hoa-documents-wrapper.display-list .hoa-documents-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.hoa-documents-list .hoa-document-item {
    padding: 10px;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 10px;
}

.hoa-document-item .document-meta {
    color: #666;
    font-size: 0.9em;
}