/* All interactive modals: ZIP viewer, Confirmations, and PWA install. */
/* ─── ZIP Modal Styles ─── */
.zip-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.zip-modal-content {
    background-color: var(--bg-about);
    color: var(--text-primary);
    width: 90%;
    max-width: 600px;
    max-height: 80%;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    overflow: hidden;
    animation: modal-appear 0.3s ease-out;
}

@keyframes modal-appear {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.zip-modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-input);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.zip-modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
}

.close-zip-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-primary);
    cursor: pointer;
    opacity: 0.7;
}

.close-zip-modal:hover { opacity: 1; }

.zip-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex-grow: 1;
}

.zip-entry-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.zip-entry-list li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.entry-name {
    word-break: break-all;
    margin-right: 10px;
}

.entry-size {
    font-size: 0.8rem;
    opacity: 0.7;
    white-space: nowrap;
}

.open-zip-btn {
    display: inline-block;
    padding: 6px 12px;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.2s ease;
    margin-right: 8px;
    border: none;
    background-color: #ff9800;
    color: white;
    cursor: pointer;
}

.open-zip-btn:hover {
    background-color: #f57c00;
    transform: translateY(-2px);
}

/* ─── Download Confirmation Modal ─── */
.confirm-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 4000;
}

.confirm-modal-content {
    background-color: var(--bg-about);
    color: var(--text-primary);
    width: 90%;
    max-width: 500px;
    max-height: 85%;
    border-radius: 15px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    overflow: hidden;
    animation: modal-appear 0.3s ease-out;
}

.confirm-modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-input);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.confirm-modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
}

.close-confirm-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-primary);
    cursor: pointer;
    opacity: 0.7;
}

.confirm-modal-body {
    padding: 20px;
    overflow-y: auto;
    flex-grow: 1;
}

.confirm-item-list-container {
    background: rgba(0,0,0,0.03);
    border-radius: 8px;
    padding: 10px;
    margin: 15px 0;
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid var(--border-input);
}

.confirm-item-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.confirm-item-list li {
    padding: 6px 0;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.confirm-summary {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid var(--border-input);
    text-align: right;
    font-size: 1.1rem;
}

.confirm-modal-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--border-input);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.btn-cancel, .btn-confirm {
    padding: 10px 20px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

.btn-cancel {
    background: #e0e0e0;
    color: #333;
}

.btn-confirm {
    background: #1e88e5;
    color: white;
}

.btn-cancel:hover { background: #d5d5d5; }

.btn-confirm:hover {
    background: #1565c0;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* ─── PWA Installation Modal ─── */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.modal.hidden { display: none; }

.modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 20px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    animation: modalSlideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

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

.modal-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 20px;
}

.modal-logo {
    width: 80px;
    height: 80px;
    border-radius: 15px;
    margin-bottom: 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.modal-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.modal-actions button {
    flex: 1;
    padding: 12px;
    border-radius: 10px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

.btn-primary {
    background-color: #2563eb;
    color: white;
}

.btn-secondary {
    background-color: #e2e8f0;
    color: #475569;
}
