/* ========================================
   PEDAGOGIA MINHA CONTA — DOWNLOADS
   ======================================== */

.download-review-btn {
    display: inline-block;
    background: #fff7e6;
    color: #e67e22;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid #f5d7a1;
    transition: .2s;
    margin-top: 6px;
}

.download-review-btn:hover {
    background: #e67e22;
    color: #fff;
}

.download-reviewed {
    margin-top: 6px;
    font-size: 13px;
    color: #27ae60;
    font-weight: 600;
}

.pmv-review-btn {
    display: inline-block;
    margin-top: 6px;
    padding: 6px 10px;
    background: #fff7e6;
    color: #e67e22;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid #f5d7a1;
    transition: .2s;
}

.pmv-review-btn:hover {
    background: #e67e22;
    color: #fff;
}

.pmv-reviewed {
    display: inline-block;
    margin-top: 6px;
    font-size: 12px;
    color: #27ae60;
    font-weight: 600;
}

.review-toggle {
    width: 100%;
    margin-top: 12px;
    padding: 8px;
    background: #fff;
    border: 1px dashed #ccc;
    border-radius: 10px;
    font-size: 13px;
    cursor: pointer;
    color: #555;
    transition: .2s;
}

.review-toggle:hover {
    border-color: #7ab730;
    color: #7ab730;
}

.review-box.hidden {
    display: none;
}

.review-done-mini {
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px 12px;
    border-radius: 12px;
    background: #f4fdf5;
    border: 1px solid #e2f2df;
}

.review-left {
    display: flex;
    align-items: center;
    gap: 6px;
}

.review-check {
    color: #2e7d32;
    font-weight: 700;
}

.review-label {
    font-size: 13px;
    font-weight: 600;
    color: #2e7d32;
}

.review-stars-mini {
    display: flex;
    margin-left: 6px;
}

.review-stars-mini .star {
    font-size: 14px;
    color: #ddd;
}

.review-stars-mini .star.active {
    color: #ffc107;
}

.edit-review-btn {
    background: #fff;
    border: 1px solid #7ab730;
    color: #7ab730;
    font-size: 12px;
    padding: 2px 4px;
    border-radius: 8px;
    cursor: pointer;
    transition: .2s;
    margin-left: 15px;
}

.edit-review-btn:hover {
    background: #7ab730;
    color: #fff;
}

.review-user-stars {
    display: flex;
    justify-content: center;
    margin-bottom: 6px;
}

.review-user-stars .star {
    font-size: 20px;
    color: #ddd;
}

.review-user-stars .star.active {
    color: #ffc107;
}

.review-user-text {
    font-size: 13px;
    margin: 6px 0;
    text-align: center;
    color: #333;
}

.edit-review-btn {
    margin-top: 8px;
    background: #fff;
    border: 1px solid #7ab730;
    color: #7ab730;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
}

.review-done {
    margin-top: 12px;
    background: #f4fdf5;
    border: 1px solid #7ab730;
    color: #2e7d32;
    padding: 10px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
}

.review-image {
    margin-top: 8px;
    width: 100%;
    font-size: 12px;
}

.review-image::file-selector-button {
    background: #f4fdf5;
    border: 1px solid #7ab730;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
}

.review-box {
    margin-top: 16px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 14px;
    padding: 16px 14px 18px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.04);
    transition: .2s;
}

.review-box:hover {
    box-shadow: 0 10px 28px rgba(0,0,0,0.08);
}

.review-box::before {
    content: "Avalie este material";
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #666;
    margin-bottom: 8px;
}

.stars {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
}

.stars .star {
    font-size: 32px;
    cursor: pointer;
    color: #e0e0e0;
    transition: .2s;
}

.stars .star:hover {
    transform: scale(1.2);
}

.stars .star.active {
    color: #ffc107;
    text-shadow: 0 2px 6px rgba(255,193,7,0.4);
}

.review-comment {
    width: 100%;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 12px;
    font-size: 13px;
    font-family: "Poppins";
    resize: none;
    transition: .2s;
}

.review-comment:focus {
    border-color: #7ab730;
    outline: none;
    box-shadow: 0 0 0 3px rgba(122,183,48,0.15);
}

.review-title {
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 6px;
}

.send-review {
    width: 100%;
    margin-top: 10px;
    padding: 8px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #7ab730, #5f9226);
    color: #fff;
    font-weight: 700;
    letter-spacing: .3px;
    cursor: pointer;
    transition: .2s;
    box-shadow: 0 6px 16px rgba(122,183,48,0.35);
}

.send-review:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 22px rgba(122,183,48,0.4);
}

.review-feedback {
    margin-top: 10px;
    font-size: 13px;
    font-weight: 600;
    text-align: center;
}

.review-feedback.ok {
    color: #27ae60;
}

.review-feedback.err {
    color: #e74c3c;
}

.pdg-popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.pdg-popup-box {
    background: #fff;
    width: 90%;
    max-width: 480px;
    padding: 35px 30px;
    border-radius: 18px;
    text-align: center;
    position: relative;
    animation: pdgFade 0.4s ease;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

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

.pdg-popup-badge {
    display: inline-block;
    background: #7ab730;
    color: #fff;
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 50px;
    margin-bottom: 12px;
    text-transform: uppercase;
}

.pdg-popup-box h2 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #2c3e50;
}

.pdg-popup-box p {
    font-size: 14px;
    margin-bottom: 18px;
    color: #555;
}

.pdg-popup-btn {
    display: inline-block;
    background: #25D366;
    color: #fff !important;
    padding: 14px 24px;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    box-shadow: 0 10px 20px rgba(37,211,102,0.25);
    transition: 0.25s;
}

.pdg-popup-btn:hover {
    transform: translateY(-3px);
}

.pdg-popup-note {
    display: block;
    margin-top: 12px;
    font-size: 12px;
    color: #777;
}

.pdg-popup-close {
    position: absolute;
    top: 15px;
    right: 18px;
    font-size: 22px;
    cursor: pointer;
    color: #999;
}

.custom-downloads-wrapper {
    max-width: 980px;
    margin: 30px auto 50px;
    background: #f9f9f9;
    border-radius: 16px;
    padding: 35px 25px 40px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    font-family: "Poppins", sans-serif;
}

.downloads-title {
    text-align: center;
    font-size: 22px;
    color: #2c3e50;
    font-weight: 700;
    margin-bottom: 35px;
}

.downloads-empty {
    text-align: center;
    font-size: 15px;
    color: #555;
    padding: 30px;
    background: #fff;
    border-radius: 12px;
    border: 1px solid #eee;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    max-width: 600px;
    margin: 0 auto;
}

.download-order-block {
    background: #fff;
    border: 1px solid #e5e5e5;
    border-radius: 14px;
    padding: 22px 25px 28px;
    margin-bottom: 28px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.03);
}

.download-order-header h3 {
    font-size: 17px;
    color: #2c3e50;
    font-weight: 700;
    margin: 0 0 4px;
}

.download-order-header a {
    color: #7ab730;
    text-decoration: none;
    transition: 0.2s ease;
}

.download-order-header a:hover {
    color: #5f9226;
    text-decoration: underline;
}

.download-order-meta {
    font-size: 14px;
    color: #555;
}

.download-order-meta .status {
    font-weight: 600;
    color: #7ab730;
}

.downloads-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 22px;
    margin-top: 18px;
}

.download-card {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 12px;
    padding: 18px 14px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.25s ease;
    box-shadow: 0 3px 8px rgba(0,0,0,0.03);
}

.download-card:hover {
    background: #f8fbf6;
    border-color: #7ab730;
    box-shadow: 0 3px 10px rgba(122,183,48,0.2);
    transform: translateY(-3px);
}

.download-thumb-wrapper {
    width: 100%;
    display: flex;
    justify-content: center;
    margin-bottom: 12px;
}

.download-thumb-large {
    width: 140px;
    height: 140px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid #e5e5e5;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.download-card:hover .download-thumb-large {
    transform: scale(1.03);
}

.download-info {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.download-name {
    font-size: 15px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 6px;
    line-height: 1.3;
}

.download-btn {
    display: inline-block;
    background: #7ab730;
    color: #fff !important;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.25s ease;
    box-shadow: 0 3px 8px rgba(122,183,48,0.25);
    border: none;
    cursor: pointer;
}

.download-btn:hover {
    background: #699d28;
    transform: translateY(-2px);
}

.downloads-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 22px;
}

.downloads-page-meta {
    margin-top: 22px;
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: #6b7280;
}

.downloads-pagination a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    border-radius: 10px;
    border: 1px solid #dcdcdc;
    background: #fff;
    color: #2c3e50;
    text-decoration: none;
    font-weight: 600;
    transition: all .2s ease;
}

.downloads-pagination a:hover {
    border-color: #7ab730;
    color: #7ab730;
    transform: translateY(-1px);
}

.downloads-pagination a.active {
    background: #7ab730;
    color: #fff;
    border-color: #7ab730;
    box-shadow: 0 6px 16px rgba(122,183,48,0.28);
}

.downloads-pagination a.nav {
    padding: 0 14px;
    min-width: auto;
}

.downloads-pagination .dots {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 38px;
    color: #6b7280;
    font-weight: 700;
    letter-spacing: 1px;
    user-select: none;
}

.review-image-front {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.review-image-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    cursor: zoom-in;
}

.review-thumb {
    width: 96px;
    height: 96px;
    object-fit: cover;
    border-radius: 10px;
    cursor: zoom-in;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    transition: transform .2s ease, box-shadow .2s ease;
}

.review-thumb:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 22px rgba(0,0,0,0.18);
}

.review-image-hint {
    font-size: 12px;
    color: #6b7280;
}

body.review-lightbox-open {
    overflow: hidden;
}

.review-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.82);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 99999;
}

.review-lightbox-content {
    position: relative;
    max-width: min(92vw, 980px);
    max-height: 90vh;
}

.review-lightbox img {
    display: block;
    max-width: 100%;
    max-height: 88vh;
    border-radius: 12px;
}

.review-close {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #fff;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 22px;
}

@media (max-width: 1024px) {
    .downloads-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .custom-downloads-wrapper {
        padding: 25px 15px;
    }

    .downloads-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .download-thumb-large {
        width: 120px;
        height: 120px;
    }

    .download-card {
        padding: 16px 12px;
    }

    .download-btn {
        width: 100%;
        text-align: center;
    }
}
