/* Filemanager Styles */

/* Pesan Status */
.fm-message-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
}
.fm-message-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
}

/* Modal Konfirmasi Hapus (File & Folder) */
.fm-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 1000;
}
.fm-modal-box {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #ffffff;
    border-radius: 12px;
    padding: 25px;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    z-index: 1001;
    text-align: center;
    font-family: Arial, sans-serif;
}
.fm-modal-icon-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 3px solid #FBCF8F;
    margin: 0 auto 20px auto;
    display: flex;
    align-items: center;
    justify-content: center;
}
.fm-modal-icon {
    font-size: 50px;
    color: #FBCF8F;
    font-weight: bold;
}
.fm-modal-title {
    margin: 0 0 10px 0;
    font-size: 24px;
    font-weight: 600;
}
.fm-modal-text {
    margin: 0 0 20px 0;
    font-size: 16px;
    color: #555;
}
.fm-modal-info {
    margin: 0 0 25px 0;
    font-size: 14px;
    color: #333;
    background: #f4f4f4;
    padding: 8px;
    border-radius: 5px;
}
.fm-modal-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
}
.fm-modal-button { /* Base style for buttons inside modal */
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    text-decoration: none;
    flex-grow: 1;
    color: white;
}
.fm-modal-button-confirm {
    background-color: #28a745; /* Green */
}
.fm-modal-button-cancel {
    background-color: #dc3545; /* Red */
}

/* Halaman Edit File/Folder */
.fm-edit-form-container {
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
}
.fm-edit-form-title {
    font-size: 18px;
    margin-bottom: 15px; /* Increased margin */
    display: block;
}
.fm-edit-input,
.fm-edit-textarea {
    width: 95%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box; /* Ensures padding doesn't increase width */
    margin-bottom: 15px; /* Added margin */
}
.fm-edit-textarea {
    min-height: 80px; /* Give textarea some height */
    vertical-align: top; /* Align with label */
}
.fm-edit-label { /* Optional: Style for labels */
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}
.fm-edit-actions { /* Container for buttons */
    margin-top: 10px;
}
.fm-edit-button-save {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
}
.fm-edit-button-cancel {
    display: inline-block;
    margin-left: 10px;
    text-decoration: none;
    color: #555;
}

/* Ringkasan Aset */
.fm-summary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}
.fm-summary-card {
    border-radius: 10px;
    padding: 15px;
    display: flex;
    align-items: center;
}
.fm-summary-icon-wrapper {
    font-size: 24px;
    margin-right: 15px;
    padding: 8px;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    text-align: center;
    box-sizing: border-box;
}
.fm-summary-info-title {
    font-weight: bold;
    color: #333;
}
.fm-summary-info-size {
    font-size: 14px;
    color: #555;
}
/* Specific card colors */
.fm-summary-card.images { background-color: #f0f7ff; border: 1px solid #d6e9ff; }
.fm-summary-card.images .fm-summary-icon-wrapper { color: #007bff; background: #d6e9ff; }
.fm-summary-card.videos { background-color: #effbf3; border: 1px solid #d4f5e1; }
.fm-summary-card.videos .fm-summary-icon-wrapper { color: #28a745; background: #d4f5e1; }
.fm-summary-card.audios { background-color: #fffaf0; border: 1px solid #ffeed1; }
.fm-summary-card.audios .fm-summary-icon-wrapper { color: #ffc107; background: #ffeed1; }
.fm-summary-card.documents { background-color: #f9f2ff; border: 1px solid #ecccff; }
.fm-summary-card.documents .fm-summary-icon-wrapper { color: #6f42c1; background: #ecccff; }

/* Header Navigasi & Search */
.fm-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
    flex-wrap: wrap;
    gap: 10px;
}
.fm-header-title-main {
    font-size: 24px;
    font-weight: 600;
    margin-right: 20px;
}
.fm-header-title-active {
    font-size: 18px;
    color: #007bff;
    border-bottom: 3px solid #007bff;
    padding-bottom: 11px; /* Adjust to align with border */
    font-weight: 500;
}
.fm-search-container {
    position: relative;
}
.fm-search-toggle-button {
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 8px 12px;
    cursor: pointer;
    background-color: #fff;
    color: #555;
}
.fm-search-popover {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    padding: 20px;
    width: 300px;
    z-index: 100;
    margin-top: 5px;
}
.fm-search-popover label {
    display: block;
    font-weight: 500;
    margin-bottom: 5px;
    color: #333;
}
.fm-search-popover input[type="search"],
.fm-search-popover select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
    margin-bottom: 15px;
}
.fm-search-popover select {
    background-color: #fff;
    appearance: none;
    -webkit-appearance: none;
    background-image: url('data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%27http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%27%20width%3D%27292.4%27%20height%3D%27292.4%27%3E%3Cpath%20fill%3D%27%23666%27%20d%3D%27M287%2069.4a17.6%2017.6%200%200%200-13-5.4H18.4c-5%200-9.3%201.8-13%205.4A17.6%2017.6%200%200%200%200%2082.2c0%205%201.8%209.3%205.4%2013l128%20128c3.6%203.6%207.8%205.4%2013%205.4s9.4-1.8%2013-5.4l128-128c3.6-3.6%205.4-7.8%205.4-13%200-5-1.8-9.4-5.4-13z%27%2F%3E%3C%2Fsvg%3E');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 10px;
    padding-right: 30px;
}
.fm-search-popover button {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    width: 100%;
}

/* Area Upload */
.fm-drop-zone {
    border: 2px dashed #ccc;
    border-radius: 10px;
    padding: 25px;
    text-align: center;
    background-color: #fafafa;
    margin-bottom: 30px;
    position: relative;
}
.fm-upload-prompt-icon {
    font-size: 30px;
    color: #555;
    margin-bottom: 10px;
}
.fm-upload-prompt-title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
}
.fm-upload-prompt-subtitle {
    font-size: 14px;
    color: #777;
    margin-bottom: 15px;
}
.fm-upload-select-button-label {
    cursor: pointer;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    padding: 8px 15px;
    border-radius: 5px;
    display: inline-block;
    font-size: 14px;
    font-weight: 500;
}
.fm-upload-folder-select-container {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}
.fm-upload-folder-select {
    padding: 5px;
    border-radius: 5px;
    border: 1px solid #ccc;
    margin-left: 5px;
}
.fm-upload-progress-container {
    display: none;
    padding: 40px 10px;
}
.fm-upload-progress-filename {
    font-weight: bold;
    margin-bottom: 10px;
    color: #333;
}
.fm-upload-progress-bar-wrapper {
    background-color: #e9ecef;
    border-radius: 5px;
    overflow: hidden;
    height: 20px;
    width: 90%;
    max-width: 400px;
    margin: 0 auto;
}
.fm-upload-progress-bar {
    width: 0%;
    height: 100%;
    background-color: #28a745;
    transition: width 0.3s ease;
}
.fm-upload-progress-percent {
    margin-top: 5px;
    font-size: 14px;
    color: #555;
}

/* Form Buat Folder */
.fm-create-folder-form-container {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}
.fm-create-folder-input {
    padding: 5px;
    border-radius: 5px;
    border: 1px solid #ccc;
}
.fm-create-folder-button {
    background-color: #6c757d;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 5px;
    cursor: pointer;
    margin-left: 5px;
}

/* Grid Daftar File */
.fm-file-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}
.fm-file-card {
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    overflow: hidden;
}
.fm-file-card-thumbnail img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-top-left-radius: 8px; /* Apply to container if needed */
    border-top-right-radius: 8px; /* Apply to container if needed */
    background-color: #eee;
    display: block; /* Remove potential space below image */
}
.fm-file-card-thumbnail-icon {
    width: 100%;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f4f6f8;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
}
.fm-file-card-thumbnail-icon i {
    font-size: 60px;
    color: #adb5bd;
}
.fm-file-card-body {
    padding: 10px 12px;
}
.fm-file-card-filename {
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 8px;
    font-size: 14px;
}
.fm-file-card-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12px;
    color: #777;
}
.fm-file-card-actions a {
    margin-left: 8px; /* Adjusted from margin-right on previous elements */
    text-decoration: none;
}
.fm-file-card-actions a:first-child {
    margin-left: 0; /* No margin on the first icon */
}
.fm-file-card-actions .action-view { color: #007bff; }
.fm-file-card-actions .action-edit { color: #17a2b8; }
.fm-file-card-actions .action-delete { color: #dc3545; }

/* Info Pencarian & No Data Found */
.fm-search-info {
    font-size: 16px;
    margin-bottom: 15px;
    padding: 10px;
    background: #f0f0f0;
    border-radius: 5px;
}
.fm-no-data {
    text-align: center;
    padding: 50px 20px;
    background-color: #fcfcfc;
    border: 1px solid #f0f0f0;
    border-radius: 10px;
    margin-top: 20px;
}
.fm-no-data-icon {
    font-size: 80px;
    color: #d0d0d0;
    margin-bottom: 20px;
}
.fm-no-data-text {
    font-size: 18px;
    font-weight: 500;
    color: #555;
}
.fm-no-data-subtext {
    color: #777;
    margin-top: 10px;
}

/* Paging (jika menggunakan fungsi paging bawaan) */
/* Style ini mungkin perlu disesuaikan dengan output fungsi paging() Anda */
.fm-paging-container {
    margin-top: 25px;
    padding-top: 15px;
    border-top: 1px solid #eee;
    font-size: 14px;
}
.fm-paging-info {
    color: #555;
    margin-bottom: 10px; /* Space between info and buttons */
    text-align: center;
}
.fm-paging-links {
    text-align: center;
}
.fm-paging-links a,
.fm-paging-links span {
    display: inline-block;
    text-decoration: none;
    background-color: #f0f0f0;
    border: 1px solid #ddd;
    color: #333;
    padding: 8px 12px;
    border-radius: 5px;
    margin: 0 3px; /* Spacing between buttons */
}
.fm-paging-links span.current { /* Current page number */
    background-color: #007bff;
    color: white;
    border-color: #007bff;
    font-weight: bold;
}
.fm-paging-links span.disabled { /* Disabled Prev/Next */
    background-color: #f9f9f9;
    color: #aaa;
    cursor: not-allowed;
}