
* {
    margin: 0;
    padding: 0;
}
.modal-overlay {
    margin: 0;
}


h1 {
    text-align: center;
    margin-bottom: 20px;
}

.layout {
    display: flex;
    gap: 30px;
    max-width: 1400px;
    margin: auto;
}
.layout {
    padding: 20px;  /* keep spacing here */
}
.form-container,
.preview-container {
    padding: 20px;  /* spacing inside cards */
}

.form-container,
.preview-container {
    background: white;
    padding: 20px;
    border-radius: 8px;
    flex: 1;
}

label {
    display: block;
    margin-top: 12px;
    font-weight: 600;
}

input, textarea, select {
    width: 100%;
    padding: 8px;
    margin-top: 5px;
}
#download-pdf-btn {
    margin-top: 18px;
    width: 100%;
    padding: 12px 18px;
    background: linear-gradient(135deg, #28a745, #218838);
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.2s;
    box-shadow: 0 4px 10px rgba(40, 167, 69, 0.25);
}

#download-pdf-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(40, 167, 69, 0.35);
    background: linear-gradient(135deg, #218838, #1e7e34);
}

#download-pdf-btn:active {
    transform: translateY(0);
    box-shadow: 0 3px 8px rgba(40, 167, 69, 0.25);
}
/* ================= FILE NAME MODAL ================= */

.modal-overlay {
    position: fixed;
    top: 0; bottom: 0; left: 0; right: 0;
    margin: -20px; /* compensate for body padding */
    background: rgba(0,0,0,0.45);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}


/* Show modal */
.modal-overlay.active {
    display: flex;
}

/* Modal box */
.modal-box {
    width: 360px;
    background: #ffffff;
    border-radius: 10px;
    padding: 24px 26px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.25);
    animation: modalFadeIn 0.25s ease;
}

/* Title */
.modal-box h3 {
    margin: 0 0 14px;
    font-size: 20px;
    font-weight: 600;
    color: #222;
}

/* Input label */
.modal-box label {
    font-size: 14px;
    font-weight: 500;
    color: #444;
}

/* Input */
.modal-box input {
    width: 100%;
    margin-top: 6px;
    padding: 10px 12px;
    font-size: 15px;
    border: 1px solid #ccc;
    border-radius: 6px;
    outline: none;
}

.modal-box input:focus {
    border-color: #28a745;
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.15);
}

/* Buttons */
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 22px;
}

.modal-actions button {
    padding: 9px 16px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 6px;
    border: none;
    cursor: pointer;
}

/* Cancel */
#cancel-download {
    background: #e0e0e0;
    color: #333;
}

#cancel-download:hover {
    background: #d5d5d5;
}

/* Confirm */
#confirm-download {
    background: #28a745;
    color: #fff;
}

#confirm-download:hover {
    background: #218838;
}

/* Animation */
@keyframes modalFadeIn {
    from {
        transform: translateY(10px) scale(0.98);
        opacity: 0;
    }
    to {
        transform: translateY(0) scale(1);
        opacity: 1;
    }
}
