.acas-lightbox[hidden] { display: none !important; }

/* Álbum do Casamento */
.acas-upload,
.acas-gallery-wrap,
.acas-delete-page {
    width: 100%;
    max-width: 1100px;
    margin: 30px auto;
    box-sizing: border-box;
}

.acas-card {
    background: #fff;
    border-radius: 18px;
    padding: 24px;
    box-shadow: 0 8px 30px rgba(0,0,0,.08);
    text-align: center;
}

.acas-card h2,
.acas-gallery-heading h2 {
    margin: 0 0 10px;
}

.acas-card p,
.acas-gallery-heading p {
    margin: 0 auto 22px;
    opacity: .78;
}

.acas-actions {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.acas-button,
.acas-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    box-sizing: border-box;
}

.acas-button {
    background: #222;
    color: #fff;
}

.acas-button-secondary {
    background: #eee;
    color: #222;
}

.acas-submit {
    width: 100%;
    margin-top: 20px;
    background: #222;
    color: #fff;
}

.acas-submit:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.acas-hidden-input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

.acas-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-top: 22px;
}

.acas-preview-item {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: 10px;
    background: #eee;
}

.acas-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.acas-remove-preview {
    position: absolute;
    top: 5px;
    right: 5px;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 50%;
    background: rgba(0,0,0,.7);
    color: #fff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.acas-message {
    margin-top: 16px;
    min-height: 20px;
}

.acas-message.success {
    color: #1c6b38;
}

.acas-message.error {
    color: #a32727;
}

.acas-progress {
    margin-top: 18px;
}

.acas-progress-bar {
    width: 100%;
    height: 8px;
    overflow: hidden;
    border-radius: 99px;
    background: #eee;
}

.acas-progress-bar span {
    display: block;
    height: 100%;
    width: 0;
    background: #222;
    transition: width .15s;
}

.acas-gallery-heading {
    text-align: center;
    margin-bottom: 25px;
}

.acas-gallery {
    columns: 4 220px;
    column-gap: 10px;
}

.acas-photo {
    display: block;
    margin: 0 0 10px;
    break-inside: avoid;
    overflow: hidden;
    border-radius: 10px;
    background: #eee;
}

.acas-photo img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform .25s ease;
}

.acas-photo:hover img {
    transform: scale(1.025);
}

.acas-empty {
    padding: 50px 20px;
    text-align: center;
    background: #f7f7f7;
    border-radius: 15px;
}

.acas-pagination {
    display: flex;
    justify-content: center;
    gap: 7px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.acas-pagination a {
    display: inline-flex;
    min-width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    text-decoration: none;
    background: #eee;
    color: #222;
}

.acas-pagination a.active {
    background: #222;
    color: #fff;
}

.acas-lightbox {
    position: fixed;
    z-index: 999999;
    inset: 0;
    background: rgba(0,0,0,.92);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 25px;
}

.acas-lightbox img {
    max-width: 95vw;
    max-height: 90vh;
    object-fit: contain;
}

.acas-lightbox-close {
    position: fixed;
    top: 15px;
    right: 20px;
    width: 45px;
    height: 45px;
    border: 0;
    border-radius: 50%;
    background: rgba(255,255,255,.15);
    color: #fff;
    font-size: 30px;
    cursor: pointer;
}

.acas-no-scroll {
    overflow: hidden;
}

.acas-delete-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}

.acas-delete-card {
    background: #fff;
    border-radius: 12px;
    padding: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,.07);
}

.acas-delete-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
    border-radius: 8px;
}

.acas-delete-button {
    width: 100%;
    margin-top: 8px;
    min-height: 40px;
    border: 0;
    border-radius: 8px;
    background: #a52222;
    color: #fff;
    cursor: pointer;
}

.acas-delete-button:disabled {
    opacity: .6;
}

.acas-admin-message {
    max-width: 700px;
    margin: 40px auto;
    padding: 20px;
    background: #fff3f3;
    border-radius: 10px;
}


@media (max-width: 700px) {
    .acas-card {
        padding: 20px 15px;
    }

    .acas-actions {
        flex-direction: column;
    }

    .acas-button {
        width: 100%;
    }

    .acas-gallery {
        columns: 2 140px;
        column-gap: 7px;
    }

    .acas-photo {
        margin-bottom: 7px;
        border-radius: 7px;
    }

    .acas-delete-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

.acas-delete-total { text-align: center; margin-bottom: 20px; opacity: .75; }

.acas-gallery-action {
    display: flex;
    justify-content: center;
    margin: 0 0 24px;
}

.acas-gallery-upload-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 28px;
    border-radius: 999px;
    background: #222;
    color: #fff !important;
    text-decoration: none !important;
    font-weight: 600;
    transition: opacity .2s ease;
}

.acas-gallery-upload-button:hover {
    opacity: .85;
}

@media (max-width: 700px) {
    .acas-gallery-upload-button {
        width: 100%;
    }
}

/* Ajustes visuais da versão 1.6 */
.acas-gallery-intro {
    text-align: center;
    margin: 0 auto 18px;
}

.acas-gallery-intro p {
    margin: 0;
    opacity: .78;
    font-size: 16px;
    line-height: 1.6;
}

.acas-gallery-action {
    margin: 0 0 30px;
}

.acas-gallery-upload-button {
    min-width: 190px;
    min-height: 50px;
    padding: 0 30px;
    gap: 9px;
    border: 1px solid rgba(0,0,0,.08);
    box-shadow: 0 5px 14px rgba(0,0,0,.08);
    background: #222;
    letter-spacing: .1px;
    transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}

.acas-gallery-upload-button:hover {
    opacity: 1;
    transform: translateY(-1px);
    box-shadow: 0 7px 18px rgba(0,0,0,.12);
}

.acas-button-icon {
    font-size: 16px;
    line-height: 1;
}

@media (max-width: 700px) {
    .acas-back-link {
        min-width: min(235px, calc(100vw - 70px));
    }

    .acas-gallery-intro {
        padding: 0 15px;
    }

    .acas-gallery-intro p {
        font-size: 15px;
    }

    .acas-gallery-upload-button {
        width: min(100%, 320px);
    }

    .acas-upload-back {
        margin-bottom: 14px;
    }
}

.acas-return-album {
    display: flex;
    justify-content: center;
    margin-top: 18px;
}

.acas-return-album-button {
    min-width: 150px;
    min-height: 48px;
    margin: 0;
}
