/**
 * Password overlay for protected portfolio posts (default / error / success).
 */

.pp-overlay {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: #F5F5F7;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.pp-close {
    position: absolute;
    top: 24px;
    right: 24px;
    line-height: 0;
}

.pp-close:hover svg path {
    stroke: #5D4A8F;
}

.pp-card {
    background: #FFFFFF;
    border-radius: 12px;
    width: 464px;
    max-width: 100%;
    padding: 48px 40px;
    text-align: center;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

.pp-kicker {
    font-family: 'camptonmedium';
    font-size: 14px;
    line-height: 20px;
    color: #191919;
    margin: 0 0 24px;
}

.pp-card h1 {
    font-family: 'camptonbold';
    font-size: 28px;
    line-height: 1.2;
    color: #191919;
    margin: 0 0 28px;
}

.pp-form {
    display: flex;
}

.pp-form input[type="password"] {
    flex: 1;
    min-width: 0;
    height: 50px;
    border: 2px solid #191919;
    border-right: 0;
    padding: 0 14px;
    font-size: 16px;
    background: #FFFFFF;
    border-radius: 0;
    box-shadow: none;
    outline: none;
}

.pp-form input[type="password"]:focus {
    border-color: #5D4A8F;
}

.pp-go {
    width: 64px;
    height: 50px;
    background: #5D4A8F;
    color: #FFFFFF;
    border: 0;
    font-family: 'camptonbold';
    font-size: 14px;
    letter-spacing: 1px;
    cursor: pointer;
}

.pp-go:hover {
    background: #4A3B73;
}

/* Error state */

.pp-form--error input[type="password"] {
    border-color: #DF0000;
}

.pp-error-msg {
    color: #DF0000;
    font-family: 'camptonmedium';
    font-size: 13px;
    margin: 12px 0 0;
}

/* Request access ("Ask me for the password") */

.pp-note {
    color: #37A735;
    font-family: 'camptonmedium';
    font-size: 13px;
    margin: 0 0 20px;
}

.pp-ask-wrap {
    margin-top: 40px;
}

.pp-ask {
    display: inline-block;
    color: #5D4A8F;
    font-family: 'camptonmedium';
    font-size: 14px;
    cursor: pointer;
    list-style: none;
}

.pp-ask::-webkit-details-marker {
    display: none;
}

.pp-ask:hover {
    color: #5D4A8F;
    text-decoration: underline;
}

.pp-request {
    display: flex;
    margin-top: 16px;
}

.pp-request input[type="email"] {
    flex: 1;
    min-width: 0;
    height: 44px;
    border: 2px solid #191919;
    border-right: 0;
    padding: 0 12px;
    font-size: 14px;
    background: #FFFFFF;
    border-radius: 0;
    box-shadow: none;
    outline: none;
}

.pp-request input[type="email"]:focus {
    border-color: #5D4A8F;
}

.pp-request button {
    height: 44px;
    padding: 0 18px;
    background: #5D4A8F;
    color: #FFFFFF;
    border: 0;
    font-family: 'camptonbold';
    font-size: 13px;
    letter-spacing: 1px;
    cursor: pointer;
}

.pp-request button:hover {
    background: #4A3B73;
}

.pp-ask-wrap .pp-error-msg {
    margin-top: 10px;
}

/* Success state (shown briefly after unlocking) */

.pp-success {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100000;
    background: #37A735;
    color: #FFFFFF;
    border-radius: 999px;
    padding: 10px 22px 10px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'camptonmedium';
    font-size: 14px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    animation: pp-success-fade 4s ease forwards;
}

@keyframes pp-success-fade {
    0%   { opacity: 0; transform: translate(-50%, -8px); }
    8%   { opacity: 1; transform: translate(-50%, 0); }
    80%  { opacity: 1; }
    100% { opacity: 0; visibility: hidden; }
}

@media (max-width: 480px) {
    .pp-card {
        padding: 36px 20px;
    }

    .pp-card h1 {
        font-size: 22px;
    }
}

/* ---------------------------------------------------------------------
 * Homepage: PASSWORD badge on protected thumbnails + overlay modal.
 * ------------------------------------------------------------------- */

.pp-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 10px;
    background: #5D4A8F;
    color: #FFFFFF;
    padding: 13px 26px;
    font-family: 'camptonbold';
    font-size: 14px;
    letter-spacing: 3px;
    line-height: 1;
    pointer-events: none;
}

.pp-overlay--home[hidden] {
    display: none;
}

.pp-overlay--home {
    background: rgba(0, 0, 0, 0.6);
}

.pp-card--home {
    position: relative;
}

.pp-card--home h2 {
    font-family: 'camptonbold';
    font-size: 28px;
    line-height: 1.2;
    color: #191919;
    margin: 0 0 28px;
}

.pp-close--card {
    position: absolute;
    top: 16px;
    right: 16px;
}

.pp-home-error {
    display: flex;
    align-items: center;
    gap: 6px;
    text-align: left;
}

.pp-home-error[hidden],
.pp-home-success-view[hidden] {
    display: none;
}

.pp-home-success-view {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 188px;
}

.pp-check {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    background: #37A735;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pp-check-pop 0.45s ease;
}

@keyframes pp-check-pop {
    0%   { transform: scale(0.1); opacity: 0; }
    70%  { transform: scale(1.08); opacity: 1; }
    100% { transform: scale(1); }
}

body.pp-home-open {
    overflow: hidden;
}

.pp-go[disabled],
.pp-request button[disabled] {
    opacity: 0.5;
    cursor: wait;
}

@media (max-width: 480px) {
    .pp-badge {
        padding: 10px 18px;
        font-size: 12px;
        letter-spacing: 2px;
    }

    .pp-card--home h2 {
        font-size: 22px;
    }
}
