/* ==========================================================
   WRAPPER & CONTENT STRUCTURE
========================================================== */
.sifency-unfold-wrapper {
    --sf-unfold-btn-bg: #000000;
    --sf-unfold-btn-color: #ffffff;
    position: relative;
    width: 100%;
}
.sifency-unfold-content-wrap {
    position: relative;
    overflow: hidden;
    will-change: max-height;
}
.sifency-unfold-fade {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 100px;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 9;
}
.sifency-unfold-wrapper.is-unfolded .sifency-unfold-fade {
    opacity: 0;
}
.sifency-unfold-actions {
    display: flex;
    gap: 15px;
    margin: 20px 0;
    align-items: center;
}
.sf-unfold-btn, .sf-add-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    outline: none;
    padding: 12px 24px;
    font-size: 14px;
}

.sf-btn-icon i, .sf-btn-icon svg {
    font-size: 1.1em;
    width: 1em; height: 1em;
}
.btn-classic { background: var(--sf-unfold-btn-bg); color: var(--sf-unfold-btn-color); border-radius: 4px; }
.btn-classic:hover { opacity: 0.85; transform: translateY(-2px); }

.btn-outline { background: transparent; color: var(--sf-unfold-btn-bg); border: 2px solid var(--sf-unfold-btn-bg); border-radius: 4px; }
.btn-outline:hover { background: var(--sf-unfold-btn-bg); color: var(--sf-unfold-btn-color); }

.btn-pill { background: var(--sf-unfold-btn-bg); color: var(--sf-unfold-btn-color); border-radius: 50px; }
.btn-pill:hover { box-shadow: 0 5px 15px rgba(0,0,0,0.2); transform: translateY(-3px); }

.btn-glass { background: rgba(255, 255, 255, 0.2); color: var(--sf-unfold-btn-bg); backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, 0.3); border-radius: 10px; box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.05); }
.btn-glass:hover { background: rgba(255,255,255,0.4); }

.btn-neumorph { background: #e0e5ec; color: #4a5568; border-radius: 10px; box-shadow: 9px 9px 16px rgb(163,177,198,0.6), -9px -9px 16px rgba(255,255,255, 0.5); }
.btn-neumorph:active { box-shadow: inset 6px 6px 10px 0 rgba(163,177,198,0.6), inset -6px -6px 10px 0 rgba(255,255,255,0.5); }

.btn-cyberpunk { background: #111; color: #0ff; border: 1px solid #0ff; box-shadow: 0 0 10px #0ff, inset 0 0 10px #0ff; border-radius: 0; text-transform: uppercase; letter-spacing: 1px; }
.btn-cyberpunk:hover { background: #0ff; color: #111; box-shadow: 0 0 20px #0ff; }

.btn-brutal { background: #fff; color: #000; border: 3px solid #000; box-shadow: 5px 5px 0px #000; border-radius: 0; text-transform: uppercase; font-weight: 800; }
.btn-brutal:hover { background: #000; color: #fff; transform: translate(3px, 3px); box-shadow: 2px 2px 0px #000; }

.btn-ghost { background: transparent; color: var(--sf-unfold-btn-bg); padding: 12px 0; border-bottom: 2px solid transparent; }
.btn-ghost:hover { border-bottom-color: var(--sf-unfold-btn-bg); }

.btn-gradient { background: linear-gradient(45deg, var(--sf-unfold-btn-bg), #ff6b6b); color: #fff; border-radius: 8px; background-size: 200% auto; transition: 0.5s; }
.btn-gradient:hover { background-position: right center; }

.btn-shadow-pop { background: var(--sf-unfold-btn-bg); color: var(--sf-unfold-btn-color); border-radius: 6px; border-bottom: 4px solid rgba(0,0,0,0.3); }
.btn-shadow-pop:active { transform: translateY(4px); border-bottom: 0px solid transparent; }

/* ==========================================================
   POSITIONING SETTINGS
========================================================== */
.sifency-dark-mode-wrapper {
    z-index: 9999;
}

/* Fixed Positions */
.sf-pos-fixed-br { position: fixed; bottom: 30px; right: 30px; }
.sf-pos-fixed-bl { position: fixed; bottom: 30px; left: 30px; }
.sf-pos-fixed-tr { position: fixed; top: 30px; right: 30px; }
.sf-pos-fixed-tl { position: fixed; top: 30px; left: 30px; }
.sf-pos-inline   { position: relative; display: inline-block; }


/* ==========================================================
   BASE BUTTON RESET
========================================================== */
.sifency-dark-toggle {
    --sf-toggle-light: #f1c40f;
    --sf-toggle-dark: #2c3e50;
    
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0;
    outline: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

/* ==========================================================
   1. STYLE: MODERN PILL (SUN/MOON)
========================================================== */
.style-pill {
    width: 60px;
    height: 30px;
    background: var(--sf-toggle-light);
    border-radius: 50px;
    position: relative;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.2);
}
.style-pill .sf-icon {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: #fff;
}
.style-pill .sf-sun { left: 8px; }
.style-pill .sf-moon { right: 8px; }

.style-pill .sf-ball {
    position: absolute;
    top: 2px;
    left: 2px;
    width: 26px;
    height: 26px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.is-active .style-pill { background: var(--sf-toggle-dark); }
.is-active .style-pill .sf-ball { transform: translateX(30px); }

/* ==========================================================
   2. STYLE: FLOATING CIRCLE
========================================================== */
.style-floating {
    width: 50px;
    height: 50px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    color: var(--sf-toggle-light);
    font-size: 20px;
}
.is-active .style-floating {
    background: var(--sf-toggle-dark);
    color: #fff;
    transform: rotate(180deg);
}

/* ==========================================================
   3. STYLE: MINIMAL TEXT
========================================================== */
.style-minimal {
    font-family: inherit;
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 2px;
    color: #000;
    border-bottom: 2px solid #000;
    padding-bottom: 5px;
}
.is-active .style-minimal {
    color: #fff;
    border-bottom-color: #fff;
}

/* ==========================================================
   4. STYLE: CYBERPUNK
========================================================== */
.style-cyber {
    background: #f0f0f0;
    color: #111;
    border: 2px solid #111;
    padding: 10px 20px;
    font-weight: bold;
    font-size: 14px;
    text-transform: uppercase;
    position: relative;
}
.is-active .style-cyber {
    background: #111;
    color: #0ff;
    border-color: #0ff;
    box-shadow: 0 0 10px #0ff;
}

/* ==========================================================
   5. STYLE: NEUMORPHIC BUTTON
========================================================== */
.style-neumorph {
    width: 50px;
    height: 50px;
    background: #e0e5ec;
    border-radius: 50%;
    box-shadow: 5px 5px 10px #b8bcc2, -5px -5px 10px #ffffff;
    color: #a3b1c6;
    font-size: 18px;
}
.is-active .style-neumorph {
    background: #1a1b1e;
    box-shadow: inset 5px 5px 10px #121315, inset -5px -5px 10px #222327;
    color: #0ff;
}

/* ==========================================================
   WRAPPER & STRUCTURE
========================================================== */
.sifency-protected-wrapper {
    width: 100%;
    position: relative;
}

.sifency-unlocked-content {
    display: none; /* Handled by JS */
    animation: sfFadeIn 0.6s ease forwards;
}

/* ==========================================================
   LOCK SCREEN
========================================================== */
.sifency-protected-lock-screen {
    background: #fdfdfd;
    border: 1px solid #eaeaea;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.03);
    display: flex;
    flex-direction: column;
}

.sf-before-content {
    margin-bottom: 25px;
}
.sf-before-content h3 { margin-top: 0; }

/* ==========================================================
   FORM & INPUTS
========================================================== */
.sf-password-form {
    width: 100%;
    max-width: 500px;
    /* Margin auto centers it if alignment is set to center */
}

.sf-input-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.sf-password-input {
    flex: 1;
    min-width: 200px;
    padding: 12px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 15px;
    outline: none;
    transition: border-color 0.3s ease;
}

.sf-password-input:focus {
    border-color: #333;
}

/* ==========================================================
   ERRORS & ANIMATIONS
========================================================== */
.sf-error-msg {
    margin-top: 15px;
    font-size: 14px;
    font-weight: 500;
    animation: sfFadeIn 0.3s ease;
}

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

/* Shake Animation for Wrong Password */
.sf-shake {
    animation: sfShake 0.4s cubic-bezier(.36,.07,.19,.97) both;
}

@keyframes sfShake {
    10%, 90% { transform: translate3d(-1px, 0, 0); }
    20%, 80% { transform: translate3d(2px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
    40%, 60% { transform: translate3d(4px, 0, 0); }
}