/* ===================================================
   ZIP Password Tool — zp- prefix
   =================================================== */

/* --- Container --- */
.zp-container {
    max-width: 720px;
    margin: 0 auto;
    padding: 0 16px;
}

/* --- Security Banner --- */
.zp-security-banner {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    background: linear-gradient(135deg, #e8f5e9, #e3f2fd);
    border-radius: 12px;
    padding: 20px 16px;
    margin-bottom: 28px;
}

.zp-security-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 13px;
    line-height: 1.5;
}

.zp-security-icon {
    font-size: 22px;
    flex-shrink: 0;
}

.zp-security-item strong {
    display: block;
    font-size: 13px;
    color: #1b5e20;
    margin-bottom: 2px;
}

.zp-security-item p {
    margin: 0;
    color: #555;
    font-size: 11.5px;
}

/* --- Drop Zone --- */
.zp-drop-zone {
    border: 2.5px dashed #bdbdbd;
    border-radius: 14px;
    padding: 44px 20px;
    text-align: center;
    cursor: pointer;
    transition: border-color .25s, background .25s, transform .15s;
    background: #fafafa;
    margin-bottom: 20px;
}

.zp-drop-zone:hover {
    border-color: #2e7d32;
    background: #f1f8e9;
}

.zp-drop-zone.dragover {
    border-color: #2e7d32;
    background: #e8f5e9;
    transform: scale(1.01);
}

.zp-drop-zone.has-files {
    border-style: solid;
    border-color: #81c784;
    background: #f1f8e9;
    padding: 24px 20px;
}

.zp-drop-icon {
    font-size: 44px;
    margin-bottom: 10px;
}

.zp-drop-text {
    font-size: 15px;
    color: #333;
    margin: 0 0 6px;
    line-height: 1.6;
}

.zp-drop-hint {
    font-size: 12px;
    color: #999;
    margin: 0;
}

/* --- File List --- */
.zp-file-list {
    margin-bottom: 24px;
}

.zp-file-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-bottom: 6px;
    transition: background .15s;
}

.zp-file-item:hover {
    background: #f5f5f5;
}

.zp-file-icon {
    font-size: 20px;
    flex-shrink: 0;
    width: 28px;
    text-align: center;
}

.zp-file-name {
    flex: 1;
    font-size: 14px;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.zp-file-size {
    font-size: 12px;
    color: #888;
    flex-shrink: 0;
    min-width: 60px;
    text-align: right;
}

.zp-file-remove {
    background: none;
    border: none;
    color: #bbb;
    cursor: pointer;
    font-size: 16px;
    padding: 4px 6px;
    border-radius: 4px;
    transition: color .15s, background .15s;
    flex-shrink: 0;
}

.zp-file-remove:hover {
    color: #d93025;
    background: #fce4ec;
}

.zp-file-summary {
    text-align: right;
    font-size: 13px;
    color: #666;
    padding: 6px 14px 0;
}

.zp-file-summary strong {
    color: #333;
}

.zp-file-add-more {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #2e7d32;
    cursor: pointer;
    padding: 8px 14px;
    border: 1px dashed #81c784;
    border-radius: 8px;
    background: none;
    margin-top: 4px;
    transition: background .15s;
    width: 100%;
    justify-content: center;
}

.zp-file-add-more:hover {
    background: #e8f5e9;
}

/* --- Password Section --- */
.zp-password-section {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 24px 20px;
    margin-bottom: 20px;
}

.zp-input-group {
    margin-bottom: 14px;
}

.zp-input-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
}

.zp-input-wrap {
    display: flex;
    align-items: center;
    gap: 0;
    position: relative;
}

.zp-input-wrap input[type="password"],
.zp-input-wrap input[type="text"] {
    flex: 1;
    padding: 10px 44px 10px 14px;
    border: 1.5px solid #d0d0d0;
    border-radius: 8px;
    font-size: 15px;
    transition: border-color .2s;
    outline: none;
    background: #fafafa;
    box-sizing: border-box;
    width: 100%;
}

.zp-input-wrap input:focus {
    border-color: #2e7d32;
    background: #fff;
}

.zp-toggle-pw {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 4px 6px;
    opacity: 0.6;
    transition: opacity .15s;
}

.zp-toggle-pw:hover {
    opacity: 1;
}

.zp-password-section .zp-input-group:nth-child(2) input {
    padding: 10px 14px;
}

.zp-match-status {
    font-size: 12.5px;
    min-height: 20px;
    padding: 2px 0;
}

.zp-match-ok {
    color: #2e7d32;
}

.zp-match-ng {
    color: #d93025;
}

/* --- Advanced Settings --- */
.zp-advanced {
    margin: 16px 0;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    overflow: hidden;
}

.zp-advanced summary {
    padding: 10px 14px;
    font-size: 13px;
    cursor: pointer;
    background: #fafafa;
    color: #555;
    user-select: none;
}

.zp-advanced summary:hover {
    background: #f0f0f0;
}

.zp-advanced-body {
    padding: 14px;
}

.zp-setting-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 13px;
}

.zp-setting-row:last-child {
    margin-bottom: 0;
}

.zp-setting-row label {
    font-weight: 600;
    color: #555;
    white-space: nowrap;
    min-width: 100px;
}

.zp-setting-row select {
    flex: 1;
    padding: 8px 10px;
    border: 1.5px solid #d0d0d0;
    border-radius: 6px;
    font-size: 13px;
    background: #fff;
    outline: none;
}

.zp-setting-row select:focus {
    border-color: #2e7d32;
}

.zp-setting-row .zp-input-wrap {
    flex: 1;
}

.zp-setting-row .zp-input-wrap input {
    padding: 8px 10px;
    font-size: 13px;
}

.zp-suffix {
    font-size: 13px;
    color: #888;
    padding: 0 8px;
    flex-shrink: 0;
}

/* --- Primary Button --- */
.zp-btn {
    display: block;
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: background .2s, transform .1s, box-shadow .2s;
    margin-top: 8px;
}

.zp-btn-primary {
    background: linear-gradient(135deg, #2e7d32, #43a047);
    color: #fff;
    box-shadow: 0 4px 14px rgba(46, 125, 50, .3);
}

.zp-btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #1b5e20, #2e7d32);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(46, 125, 50, .4);
}

.zp-btn-primary:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(46, 125, 50, .3);
}

.zp-btn-primary:disabled {
    background: #bdbdbd;
    box-shadow: none;
    cursor: not-allowed;
}

/* --- Progress --- */
.zp-progress {
    margin: 20px 0;
    text-align: center;
}

.zp-progress-bar {
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 10px;
}

.zp-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #66bb6a, #2e7d32);
    border-radius: 4px;
    width: 0;
    transition: width .3s ease;
}

.zp-progress-text {
    font-size: 13px;
    color: #555;
    margin: 0;
    animation: zp-pulse 1.5s ease-in-out infinite;
}

@keyframes zp-pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: .5;
    }
}

/* --- Alerts --- */
.zp-alert {
    padding: 14px 18px;
    border-radius: 10px;
    margin: 16px 0;
    font-size: 14px;
    line-height: 1.6;
    white-space: pre-line;
}

.zp-alert-success {
    background: #e8f5e9;
    border: 1px solid #a5d6a7;
    color: #1b5e20;
}

.zp-alert-error {
    background: #fce4ec;
    border: 1px solid #ef9a9a;
    color: #b71c1c;
}

/* --- Guide --- */
.zp-guide {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
}

.zp-guide-title {
    font-size: 16px;
    margin: 0 0 14px;
    color: #333;
}

.zp-guide-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.zp-guide-item {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 14px;
    font-size: 13px;
    line-height: 1.6;
}

.zp-guide-item strong {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
}

.zp-guide-item p {
    margin: 0;
    color: #555;
}

.zp-guide-item a {
    color: #1565c0;
    text-decoration: underline;
}

.zp-guide-item code {
    background: #e8eaf6;
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 12px;
}

/* --- Responsive --- */
@media (max-width: 768px) {
    .zp-security-banner {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 16px 12px;
    }

    .zp-guide-grid {
        grid-template-columns: 1fr;
    }

    .zp-drop-zone {
        padding: 32px 16px;
    }

    .zp-drop-icon {
        font-size: 36px;
    }

    .zp-password-section {
        padding: 18px 14px;
    }

    .zp-setting-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .zp-setting-row .zp-input-wrap,
    .zp-setting-row select {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .zp-security-banner {
        grid-template-columns: 1fr;
    }

    .zp-file-size {
        display: none;
    }
}