/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Monrope", Tahoma, Geneva, Verdana, sans-serif;
}

body {
    /* background-color: #f8f9fa; */
    color: #333;
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

h2 {
    color: #2c3e50;
    font-size: 24px;
    font-weight: 600;
}

.mb-3 {
    margin-bottom: 1rem !important;
}

.mb-5 {
    margin-bottom: 3rem !important;
}

/* Form Verify Section */
.form-verify {
    padding: 60px 0;
}

/* Search File Section */

.search-file {
    margin: 0 auto;
    max-width: 550px;
    width: 100%;
    background: white;
}

.search-file h2 {
    font-size: 20px;
    font-weight: 600;
}

.search-form {
    display: flex;
    max-width: 600px;
    /* box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); */
    border-radius: 8px;
    overflow: hidden;
    justify-content: center;
}

.formbold-form-input {
    width: 100%;
    padding: 12px 16px;
    border: none;
    border-radius: 8px 0 0 8px;
    background-color: #faf8f8;
    font-size: 16px;
    outline: none;
}

.formbold-btn {
    position: relative;
    background-color: #e65b48;
    color: white;
    border: none;
    padding: 0 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 16px;
    font-weight: 500;
    transition: background-color 0.3s;
    overflow: hidden;
}

.formbold-btn:hover {
    background-color: #c04c3d;
}

.formbold-btn i {
    font-size: 20px;
}

/* .formbold-btn.loading .btn-loader {
    display: inline-block;
} */

.formbold-btn:disabled .btn-text {
    visibility: hidden;
}

.formbold-btn:disabled .bx-search {
    visibility: hidden;
}

.formbold-btn:disabled .btn-loader {
    display: block;
}

.formbold-btn:disabled {
    cursor: wait;
}

/* Upload File Section */
.upload-file {
    background-color: white;
    border-radius: 12px;
    padding: 40px;
    /* box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1); */
    border: 1px solid #e9ecef;
}

.upload-file img {
    width: 300px;
    height: auto;
    object-fit: contain;
}

.input-file {
    text-align: center;
}

.input-label {
    display: inline-block;
    padding: 16px 32px;
    background-color: #faf8f8;
    border: 2px dashed #e65b48;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    color: #e65b48;
    font-weight: 500;
    font-size: 18px;
}

.input-label:hover {
    background-color: #fce9e8;
}

.input-label i {
    font-size: 24px;
    margin-right: 8px;
    vertical-align: middle;
}

#upload {
    display: none;
}

/* Toast Notification Styles */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    transition: all 0.3s ease;
}

.toast {
    /* padding: 15px 20px; */
    /* margin-bottom: 10px; */
    border-radius: 8px;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transform: translateX(150%);
    width: 300px;
    animation: show_toast 0.3s ease forwards;
}
@keyframes show_toast {
    0% {
        transform: translateX(100%);
    }
    40% {
        transform: translateX(-5%);
    }
    80% {
        transform: translateX(0%);
    }
    100% {
        transform: translateX(-10px);
    }
}

.toast.show {
    transform: translateX(0);
}

.toast.hide {
    animation: hide_toast 0.3s ease forwards;
}
@keyframes hide_toast {
    0% {
        transform: translateX(-10px);
    }
    40% {
        transform: translateX(0%);
    }
    80% {
        transform: translateX(-5%);
    }
    100% {
        transform: translateX(calc(100% + 20px));
    }
}

.toast-header {
    background-color: unset !important;
    border-bottom: unset !important;
    color: unset !important;
    /* padding: 5px !important; */
    padding: 15px 20px !important;

    display: flex;
    align-items: center;
    justify-content: center;
    /* margin-bottom: 10px; */
}

.toast i {
    margin-right: 10px;
    font-size: 20px;
}

.toast-message {
    font-size: 14px;
    /* margin-bottom: 8px; */
    transition: all 0.3s ease;
}

.toast-progress {
    height: 4px;
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    overflow: hidden;
    width: 100%;
    transition: all 0.3s ease;
}

.toast-progress-bar {
    height: 100%;
    background-color: white;
    width: 0;
    transition: width 0.3s ease;
}

.toast-success {
    background-color: #27ae60;
}

.toast-info {
    background-color: #3498db;
}

.toast-error {
    background-color: #e74c3c;
}

/* File Info */
.file-info {
    margin-top: 20px;
    padding: 12px;
    background-color: #fef1f1;
    border-radius: 8px;
    display: none;
}

.file-info button {
    margin-left: 30px;
}

.file-name {
    margin-right: 5px;
    font-weight: 600;
    color: #2c3e50;
}

.file-size {
    color: #7f8c8d;
    font-size: 14px;
}

/* Verify Button */

.verify-btn {
    margin-top: 20px;
    background-color: #e65b48;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s;
    display: none;
    position: relative;
    overflow: hidden;
    font-weight: bold;
}

.verify-btn:hover:not(:disabled) {
    background-color: #c04c3d;
}

.verify-btn:disabled {
    background-color: #c04c3d;
    cursor: wait;
}

/* Button Loader */
.btn-loader {
    position: relative;
    display: none;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
}

.btn-loader:after {
    content: " ";
    display: block;
    width: 20px;
    height: 20px;
    border: 3px solid #e9ecef;
    border-bottom-color: transparent;
    border-radius: 50%;
    display: inline-block;
    box-sizing: border-box;
    animation: rotation 1s linear infinite;
}

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

.verify-btn:disabled .btn-text {
    visibility: hidden;
}

.verify-btn:disabled .btn-loader {
    display: block;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}
/* 
.formbold-btn.loading .btn-loader {
    display: inline-block;
} */

.verify-btn:disabled .btn-text {
    visibility: hidden;
}

.verify-btn:disabled .btn-loader {
    display: block;
}

/* Messages */
.message {
    margin-top: 20px;
    padding: 12px;
    border-radius: 8px;
    font-weight: 500;
    display: none;
}

.success-message {
    background-color: #d5f5e3;
    color: #27ae60;
}

.error-message {
    background-color: #fadbd8;
    color: #e74c3c;
}

/* Responsive */
@media (max-width: 768px) {
    .upload-file {
        flex-direction: column;
        padding: 30px 20px;
    }

    .upload-file img {
        width: 200px;
        margin-bottom: 30px;
    }

    .search-form {
        flex-direction: column;
    }

    .formbold-form-input {
        border-radius: 8px;
        margin-bottom: 8px;
    }

    .formbold-btn {
        border-radius: 8px;
        justify-content: center;
        padding: 12px;
    }

    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }

    .toast {
        width: calc(100% - 20px);
    }
}

#modalPdfFrame {
    width: 100%;
    height: 500px;
    border: none;
}

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

/* Tambahkan ini di CSS */
.modal-overlay.closing {
    animation: fadeOut 0.3s ease forwards;
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* Pastikan overlay memiliki transition default */
.modal-overlay {
    opacity: 1;
    transition: opacity 0.3s ease;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    border-radius: 12px;
    width: 98%;
    height: 97%;
    max-width: 100%;
    max-height: 100vh;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    animation: slideIn 0.3s ease;
}

.modal-header {
    /* background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); */
    border-bottom: 1px solid #e9ecef;
    color: white;
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-title::before {
    content: "📄";
    font-size: 24px;
}

.accordion {
    width: 100%;
    margin-top: 15px;
}

.accordion-header {
    background: #fef1f1;
    color: white;
    padding: 10px 20px;
    margin: 24px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
    transition: all 0.3s ease;
}

/* .accordion-header:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
} */

.accordion-header::after {
    content: "+";
    font-size: 20px;
    transition: all 0.3s ease;
    color: #e65b48;
}

.accordion-header.active::after {
    content: "−";
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: all 0.4s ease;
    background: #ffffff;
    border-radius: 0 0 10px 10px;
}

.accordion-content.show {
    max-height: 500px;
    border: 2px solid #e9ecef;
    border-top: none;
    border-radius: 0 0 10px 10px;
}

/*=============== START ===============*/
.content-table {
    border-collapse: collapse;
    font-size: 0.9em;
    min-width: 400px;
    /* border-radius: 5px 5px 0 0; */
    overflow: hidden;
    box-shadow: var(--box-shadow);
    margin-top: 20px;
}

.content-table thead th {
    color: var(--font-black-content);
    /* background-color: #e65b48; */
    text-align: center;
    vertical-align: middle;
    font-weight: bold;
}

.content-table th,
.content-table td {
    padding: 12px 15px;
}

.content-table tbody th {
    font-weight: 400;
}

.content-table tbody tr {
    border-bottom: 1px solid #dddddd;
}

.content-table tbody tr:nth-of-type(even) {
    background-color: #f3f3f3;
}

.content-table tbody tr:last-of-type {
    border-bottom: 1px solid #f3f3f3;
}
/* Modern Table Styles */
.file-details-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.file-details-table thead {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.file-details-table th {
    padding: 16px 20px;
    text-align: left;
    font-weight: 700;
    color: #495057;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid #dee2e6;
}

.file-details-table th:first-child {
    padding-left: 24px;
    border-radius: 12px 0 0 0;
}

.file-details-table th:last-child {
    padding-right: 24px;
    border-radius: 0 12px 0 0;
}

.file-details-table tbody tr {
    transition: all 0.3s ease;
    border-bottom: 1px solid #f1f3f4;
}

.file-details-table tbody tr:hover {
    background: linear-gradient(135deg, #f8f9ff 0%, #f0f2ff 100%);
    transform: scale(1.01);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.1);
}

.file-details-table tbody tr:last-child {
    border-bottom: none;
}

.file-details-table td {
    padding: 16px 20px;
    color: #495057;
    font-size: 14px;
    line-height: 1.5;
}

.file-details-table td:first-child {
    padding-left: 24px;
    font-weight: 600;
    color: #343a40;
    position: relative;
}

.file-details-table td:first-child::before {
    content: "";
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

.file-details-table td:last-child {
    padding-right: 24px;
    font-weight: 500;
    color: #6c757d;
}

/* Icon styles for table rows */
.table-icon {
    display: inline-block;
    width: 20px;
    margin-right: 8px;
    text-align: center;
}

.close-button {
    background: #c04c3d;
    border: none;
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.close-button:hover {
    background: #c04c3d;
    transform: rotate(90deg);
}

.modal-body {
    padding: 0;
    max-height: calc(90vh - 80px);
    overflow-y: auto;
}

.info-section {
    padding: 25px;
    border-bottom: 1px solid #e9ecef;
    background: #f8f9fa;
}

.info-title {
    font-size: 14px;
    font-weight: 600;
    margin: 0;
    color: #e65b48;
    display: flex;
    align-items: center;
    gap: 10px;
}

.pdf-section {
    padding: 25px;
    background: white;
}

.pdf-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.pdf-title span {
    padding: 5px 15px;
    font-size: 14px;
    color: #e65b48;
    background: #fef1f1;
    border-radius: 10px;
}

.pdf-frame-container {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    background: white;
    border: 2px solid #e9ecef;
}

.pdf-viewer iframe {
    width: 100%;
    height: 500px;
    border: none;
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .modal-header {
        padding: 15px 20px;
    }

    .info-section,
    .pdf-section {
        padding: 20px;
    }

    .pdf-viewer iframe {
        height: 400px;
    }

    .file-details-table th,
    .file-details-table td {
        padding: 12px 16px;
        font-size: 13px;
    }

    .file-details-table th:first-child,
    .file-details-table td:first-child {
        padding-left: 20px;
    }

    .file-details-table th:last-child,
    .file-details-table td:last-child {
        padding-right: 20px;
    }
}

.info-section {
    padding: 0;
    border-bottom: 1px solid #e9ecef;
    background: transparent;
}
