/* ============================================
   PDF Password Tool  (prefix: pp-)
   ============================================ */

/* ---------- Container ---------- */
.pp-container {
    max-width: 780px;
    margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ---------- Mode Tabs ---------- */
.pp-mode-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 24px;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid #e0e0e0;
}

.pp-mode-tab {
    flex: 1;
    padding: 14px 8px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all .25s;
    background: #f5f5f5;
    color: #666;
    text-align: center;
}

.pp-mode-tab:first-child {
    border-right: 2px solid #e0e0e0;
}

.pp-mode-tab.active[data-mode="encrypt"] {
    background: #1a73e8;
    color: #fff;
}

.pp-mode-tab.active[data-mode="decrypt"] {
    background: #ea4335;
    color: #fff;
}

.pp-mode-tab:hover:not(.active) {
    background: #eee;
}

/* ---------- Drop Zone ---------- */
.pp-drop-zone {
    border: 3px dashed #ccc;
    border-radius: 16px;
    padding: 48px 24px;
    text-align: center;
    cursor: pointer;
    transition: all .3s;
    background: #fafafa;
    margin-bottom: 24px;
    position: relative;
}

.pp-drop-zone:hover,
.pp-drop-zone.dragover {
    border-color: #1a73e8;
    background: #e8f0fe;
}

.pp-drop-zone.has-file {
    border-style: solid;
    border-color: #34a853;
    background: #e6f4ea;
    padding: 24px;
}

.pp-drop-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: .7;
}

.pp-drop-text {
    font-size: 15px;
    color: #555;
    margin: 0 0 8px;
    line-height: 1.6;
}

.pp-drop-hint {
    font-size: 12px;
    color: #999;
    margin: 0;
}

/* ---------- File Info ---------- */
.pp-file-info {
    display: none;
    text-align: left;
}

.pp-file-info.visible {
    display: block;
}

.pp-file-name {
    font-size: 16px;
    font-weight: 700;
    color: #222;
    margin: 0 0 6px;
    word-break: break-all;
}

.pp-file-meta {
    font-size: 13px;
    color: #666;
    margin: 0 0 4px;
}

.pp-file-status {
    font-size: 14px;
    font-weight: 600;
    margin: 8px 0 0;
}

.pp-file-status.encrypted {
    color: #ea4335;
}

.pp-file-status.not-encrypted {
    color: #34a853;
}

.pp-file-clear {
    display: inline-block;
    margin-top: 10px;
    font-size: 13px;
    color: #1a73e8;
    cursor: pointer;
    border: none;
    background: transparent;
    text-decoration: underline;
    padding: 0;
}

/* ---------- Password Section ---------- */
.pp-password-section {
    margin-bottom: 24px;
}

.pp-input-group {
    margin-bottom: 14px;
}

.pp-input-group label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #444;
    margin-bottom: 6px;
}

.pp-input-wrap {
    display: flex;
    gap: 0;
    border: 2px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    transition: border-color .2s;
}

.pp-input-wrap:focus-within {
    border-color: #1a73e8;
}

.pp-input-wrap input {
    flex: 1;
    border: none;
    padding: 12px 14px;
    font-size: 15px;
    outline: none;
    min-width: 0;
    background: transparent;
}

.pp-toggle-pw {
    border: none;
    background: #f5f5f5;
    padding: 0 14px;
    cursor: pointer;
    font-size: 16px;
    color: #888;
    transition: background .2s;
    flex-shrink: 0;
}

.pp-toggle-pw:hover {
    background: #eee;
}

.pp-input-solo {
    width: 100%;
    border: 2px solid #ddd;
    border-radius: 8px;
    padding: 12px 14px;
    font-size: 15px;
    outline: none;
    transition: border-color .2s;
    box-sizing: border-box;
}

.pp-input-solo:focus {
    border-color: #1a73e8;
}

.pp-match-status {
    font-size: 13px;
    min-height: 20px;
    margin-top: -6px;
    margin-bottom: 8px;
}

.pp-match-ok {
    color: #34a853;
}

.pp-match-ng {
    color: #ea4335;
}

/* ---------- Advanced (Accordion) ---------- */
.pp-advanced {
    margin: 16px 0 20px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
}

.pp-advanced summary {
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    background: #fafafa;
    color: #555;
    user-select: none;
}

.pp-advanced summary:hover {
    background: #f0f0f0;
}

.pp-advanced-body {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pp-advanced-body label {
    font-size: 14px;
    color: #444;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.pp-advanced-body input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #1a73e8;
}

.pp-enc-info {
    font-size: 13px;
    color: #777;
    padding-top: 8px;
    border-top: 1px solid #eee;
}

.pp-enc-info strong {
    color: #1a73e8;
    font-size: 14px;
}

/* ---------- Buttons ---------- */
.pp-btn {
    display: block;
    width: 100%;
    padding: 16px;
    font-size: 16px;
    font-weight: 700;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all .25s;
    text-align: center;
}

.pp-btn:disabled {
    opacity: .45;
    cursor: not-allowed;
}

.pp-btn-encrypt {
    background: #1a73e8;
    color: #fff;
}

.pp-btn-encrypt:hover:not(:disabled) {
    background: #1557b0;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(26, 115, 232, .35);
}

.pp-btn-decrypt {
    background: #ea4335;
    color: #fff;
}

.pp-btn-decrypt:hover:not(:disabled) {
    background: #c5221f;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(234, 67, 53, .35);
}

/* ---------- Progress ---------- */
.pp-progress {
    display: none;
    margin: 20px 0;
}

.pp-progress.visible {
    display: block;
}

.pp-progress-bar {
    height: 8px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.pp-progress-fill {
    height: 100%;
    width: 0;
    background: linear-gradient(90deg, #1a73e8, #34a853);
    border-radius: 4px;
    transition: width .4s ease;
}

.pp-progress-fill.indeterminate {
    width: 30%;
    animation: pp-indeterminate 1.5s ease-in-out infinite;
}

@keyframes pp-indeterminate {
    0% {
        transform: translateX(-100%);
    }

    100% {
        transform: translateX(400%);
    }
}

.pp-progress-text {
    font-size: 13px;
    color: #666;
    text-align: center;
    margin: 0;
}

/* ---------- Alerts ---------- */
.pp-alert {
    display: none;
    padding: 14px 18px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    margin: 16px 0;
    line-height: 1.5;
}

.pp-alert.visible {
    display: block;
}

.pp-alert-success {
    background: #e6f4ea;
    color: #1e7e34;
    border: 1px solid #a8d5ba;
}

.pp-alert-error {
    background: #fce8e6;
    color: #c5221f;
    border: 1px solid #f5c6cb;
}

/* ---------- Security Banner ---------- */
.pp-security-banner {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin: 32px 0;
    padding: 24px;
    background: linear-gradient(135deg, #f8fffe 0%, #eef6ff 100%);
    border-radius: 16px;
    border: 1px solid #d4e8d0;
}

.pp-security-item {
    text-align: center;
}

.pp-security-icon {
    display: block;
    font-size: 32px;
    margin-bottom: 8px;
}

.pp-security-item strong {
    display: block;
    font-size: 14px;
    color: #222;
    margin-bottom: 4px;
}

.pp-security-item p {
    font-size: 12px;
    color: #666;
    margin: 0;
    line-height: 1.4;
}

/* ---------- Responsive ---------- */
@media (max-width: 600px) {
    .pp-drop-zone {
        padding: 32px 16px;
    }

    .pp-drop-icon {
        font-size: 36px;
    }

    .pp-mode-tab {
        font-size: 13px;
        padding: 12px 6px;
    }

    .pp-security-banner {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 16px;
    }

    .pp-security-item {
        display: flex;
        align-items: center;
        gap: 12px;
        text-align: left;
    }

    .pp-security-icon {
        font-size: 24px;
        margin-bottom: 0;
        flex-shrink: 0;
    }

    .pp-btn {
        font-size: 15px;
        padding: 14px;
    }
}