/* =========================================================
   Base
========================================================= */

.edupdf-download-wrapper {
    position: relative;
}

.edupdf-btn,
.edupdf-download-btn,
.edupdf-manual-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 54px;
    padding: 14px 22px;
    border: none;
    border-radius: 16px;
    text-decoration: none !important;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
    cursor: pointer;
    transition: all .25s ease;
    box-sizing: border-box;
    text-align: center;
    word-break: break-word;
}

.edupdf-download-btn {
    width: 100%;
    max-width: 320px;
}

/**
 * Full Width Override
 */

.edupdf-align-full .edupdf-download-btn,
.edupdf-align-full .edupdf-btn {
    width: 100%;
    max-width: 100%;
    display: flex;
}

.edupdf-download-btn:hover,
.edupdf-btn:hover,
.edupdf-manual-download:hover {
    transform: translateY(-2px);
    opacity: .96;
}

/* =========================================================
   Bootstrap Styles
========================================================= */

.edupdf-btn-primary {
    background: #0d6efd;
    color: #fff !important;
}

.edupdf-btn-secondary {
    background: #6c757d;
    color: #fff !important;
}

.edupdf-btn-success {
    background: #198754;
    color: #fff !important;
}

.edupdf-btn-warning {
    background: #ff9800;
    color: #212529 !important;
}

.edupdf-btn-danger {
    background: #dc3545;
    color: #fff !important;
}

/* =========================================================
   Modal
========================================================= */

.edupdf-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.edupdf-modal.active {
    display: flex;
}

.edupdf-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15,23,42,.72);
    backdrop-filter: blur(4px);
}

.edupdf-modal-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 440px;
    background: #fff;
    border-radius: 24px;
    padding: 26px 24px 24px;
    box-sizing: border-box;
    text-align: center;
    box-shadow:
        0 25px 80px rgba(0,0,0,.18);
    animation: edupdfModalShow .22s ease;
}

@keyframes edupdfModalShow {

    from {
        opacity: 0;
        transform: translateY(18px) scale(.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

}

.edupdf-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 50%;
    background: #f1f5f9;
    color: #0f172a;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    transition: .2s ease;
}

.edupdf-modal-close:hover {
    background: #e2e8f0;
}

/* =========================================================
   Modal Header
========================================================= */

.edupdf-file-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 18px;
    border-radius: 999px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 14px;
    font-weight: 700;
}

.edupdf-file-icon {
    font-size: 16px;
}

.edupdf-modal-title {
    margin: 18px 0 14px;
    font-size: 30px;
    line-height: 1.25;
    color: #0f172a;
    font-weight: 700;
    word-break: break-word;
}

.edupdf-source-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding:
        10px 18px;

    border-radius:
        999px;

    background:
        #f1f5f9;

    color:
        #475569;

    font-size:
        14px;

    font-weight:
        600;

    line-height:
        1.2;

    text-align:
        center;

    word-break:
        break-word;

    margin:
        0 auto 26px;

    max-width:
        100%;
}

/* =========================================================
   Inline Badge Layout
========================================================= */

.edupdf-modal-header {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.edupdf-file-meta-inline {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;

    flex-wrap: wrap;

    margin-bottom: 26px;
}

.edupdf-file-meta-inline .edupdf-file-badge,
.edupdf-file-meta-inline .edupdf-source-badge {
    margin: 0;
}



.edupdf-source-name {
    font-weight: 700;
}

.edupdf-file-size {
    opacity: .8;
}

/* =========================================================
   Modal Buttons
========================================================= */

.edupdf-modal-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
}

.edupdf-modal-buttons .edupdf-btn {
    width: 100%;
    min-height: 54px;
}

/* =========================================================
   Download Process Page
========================================================= */

.edupdf-download-process-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: #f8fafc;
    box-sizing: border-box;
}

.edupdf-download-card {
    width: 100%;
    max-width: 520px;
    background: #fff;
    border-radius: 26px;
    padding: 36px 28px;
    box-shadow: 0 20px 70px rgba(0,0,0,.08);
    box-sizing: border-box;
}

.edupdf-download-icon {
    width: 82px;
    height: 82px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: #dbeafe;
    color: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 42px;
}

.edupdf-download-card h1 {
    margin: 0 0 14px;
    font-size: 28px;
    line-height: 1.3;
    text-align: center;
    color: #0f172a;
}

.edupdf-info-text {
    margin: 0 0 24px;
    text-align: center;
    color: #64748b;
    line-height: 1.7;
}

.edupdf-loader {
    width: 74px;
    height: 74px;
    margin: 0 auto 24px;
    border-radius: 50%;
    border: 6px solid #dbeafe;
    border-top-color: #2563eb;
    animation: edupdfSpin 1s linear infinite;
}

@keyframes edupdfSpin {

    to {
        transform: rotate(360deg);
    }

}

.edupdf-progress-wrapper {
    width: 100%;
    height: 14px;
    background: #e2e8f0;
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 16px;
}

.edupdf-progress-bar {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg,#2563eb,#3b82f6);
    border-radius: 999px;
}

.edupdf-progress-text {
    text-align: center;
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 14px;
}

.edupdf-status-message {
    text-align: center;
    color: #475569;
    margin-bottom: 26px;
    line-height: 1.6;
}

.edupdf-download-content {
    margin-top: 28px;
    padding: 22px;
    border-radius: 18px;
    background: #f8fafc;
}

.edupdf-download-content h3 {
    margin-top: 0;
    margin-bottom: 14px;
}

.edupdf-download-content p {
    margin-bottom: 14px;
    line-height: 1.7;
    color: #475569;
}

.edupdf-manual-download {
    margin-top: 26px;
}

/* =========================================================
   Mobile
========================================================= */

@media (max-width: 768px) {

    .edupdf-modal-content {
        padding: 24px 20px;
        border-radius: 22px;
    }

    .edupdf-modal-title {
        font-size: 26px;
    }

    .edupdf-download-btn {
        max-width: 100%;
    }

    .edupdf-download-card {
        padding: 28px 22px;
    }

}

@media (max-width: 480px) {

    .edupdf-modal {
        padding: 14px;
    }

    .edupdf-modal-content {
        padding: 22px 18px;
    }

    .edupdf-modal-title {
        font-size: 24px;
    }

    .edupdf-btn,
    .edupdf-download-btn,
    .edupdf-manual-download {
        min-height: 52px;
        font-size: 14px;
    }

    .edupdf-download-card {
        padding: 24px 18px;
        border-radius: 22px;
    }

    .edupdf-download-card h1 {
        font-size: 24px;
    }

}
 
/* =========================================================
   FINAL MODAL FILE INFO
========================================================= */

.edupdf-modal-header {
    text-align: center;
}

.edupdf-file-meta-inline {
    display: flex;
    justify-content: center;

    margin-bottom: 18px;
}

.edupdf-file-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 40px;

    padding: 0 18px;

    border-radius: 999px;

    background: #dbeafe;
    color: #1d4ed8;

    font-size: 14px;
    font-weight: 700;
}

.edupdf-file-name {
    margin-bottom: 14px;

    font-size: 15px;
    font-weight: 700;

    line-height: 1.6;

    color: #0d6efd;

    text-align: center;

    word-break: break-word;
}

.edupdf-file-source {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-height: 38px;

    padding: 0 16px;

    border-radius: 999px;

    background: #f1f5f9;
    color: #64748b;

    font-size: 13px;
    font-weight: 600;
}
/**
 * =====================================================
 * Button Alignment
 * =====================================================
 */

.edupdf-align-left {
    text-align: left;
}

.edupdf-align-center {
    text-align: center;
}

.edupdf-align-right {
    text-align: right;
}

.edupdf-align-full {
    width: 100%;
    display: block;
}

.edupdf-align-full .edupdf-btn {
    width: 100%;
    display: block;
    box-sizing: border-box;
}

/**
 * =====================================================
 * Button Spacing
 * =====================================================
 */

.edupdf-download-wrapper {
    width: 100%;
    margin-bottom: 20px;
}

.edupdf-download-wrapper:last-child {
    margin-bottom: 0;
}
