/* ==================== PDF PASSWORD REMOVER STYLES ==================== */

/* Override body background for this page */
body {
    background: linear-gradient(135deg, #0f1419 0%, #1a2332 50%, #0f1419 100%) !important;
    color: var(--text-primary);
}

.password-remover-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    color: var(--text-primary);
}

.header-section {
    text-align: center;
    margin-bottom: 40px;
}

.header-section h1 {
    color: var(--text-primary);
    font-size: 2.5rem;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    font-weight: 800;
}

.header-section h1 i {
    color: #f79112;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.2rem;
    margin: 0;
}

/* Upload Section */
.upload-section {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--primary-light);
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--shadow-md);
    margin-bottom: 40px;
    backdrop-filter: blur(10px);
    position: relative;
}

.drop-zone-pdf {
    border: 3px dashed var(--primary-light);
    border-radius: 15px;
    padding: 40px 30px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.03);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 220px;
}

.drop-zone-pdf:hover {
    border-color: #f79112;
    background: rgba(247, 145, 18, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(247, 145, 18, 0.3);
}

.drop-zone-pdf.drag-over {
    border-color: #f79112;
    background: rgba(247, 145, 18, 0.15);
    transform: scale(1.02);
}

.drop-zone-pdf.loading {
    pointer-events: none;
    opacity: 0.7;
}

/* Upload Progress Bar (inside drop zone, same as pdf-to-image) */
.upload-progress-container {
    width: 100%;
    margin-top: 20px;
    animation: fadeIn 0.3s ease;
}

.upload-progress-bar {
    width: 100%;
    height: 30px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--primary-light);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.3);
}

.upload-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent-color) 0%, #f79112 100%);
    transition: width 0.3s ease;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10px;
    color: white;
    font-weight: bold;
    font-size: 0.85rem;
}

.upload-progress-text {
    margin-top: 10px;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.95rem;
    text-align: center;
}

.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.upload-icon {
    margin-bottom: 20px;
}

.upload-icon i {
    font-size: 3rem;
    color: #f79112;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

.drop-zone-pdf h3 {
    color: var(--text-primary);
    font-size: 1.5rem;
    margin: 10px 0;
}

.drop-zone-pdf p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin: 10px 0 20px 0;
}

.supported-formats {
    margin-top: 15px;
}

.supported-formats small {
    color: #f79112;
    font-size: 0.9rem;
}

.supported-formats i {
    margin-right: 5px;
}

/* Password Section */
.password-section {
    margin-top: 24px;
    animation: fadeIn 0.5s ease;
}

.password-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1.5fr);
    gap: 24px;
    align-items: stretch;
}

.password-input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--text-primary);
}

.password-input-wrapper {
    position: relative;
}

.setting-input {
    width: 100%;
    padding: 12px 45px 12px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(15, 20, 25, 0.9);
    color: var(--text-primary);
    font-size: 0.95rem;
    transition: all 0.2s ease;
}

.setting-input:focus {
    outline: none;
    border-color: #f79112;
    box-shadow: 0 0 0 1px rgba(247, 145, 18, 0.5);
}

.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle:hover {
    color: #f79112;
}

.password-hint {
    display: block;
    margin-top: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.password-hint i {
    margin-right: 6px;
    color: #f79112;
}

.file-info-card {
    background: rgba(15, 20, 25, 0.9);
    border-radius: 14px;
    padding: 18px 20px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    margin-top: 40px; /* push card down so it doesn't overlap with Clear file button */
}

.file-info-card h3 {
    margin: 0 0 12px 0;
    font-size: 1.05rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.file-info-card h3 i {
    color: #f79112;
}

.file-info-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.file-info-card li {
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

.file-info-card li span {
    opacity: 0.85;
}

.file-info-card li strong {
    color: var(--text-primary);
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* Unlock Section */
.unlock-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    /* Mobile-first: avoid overlap with file details */
    flex-direction: column;
    justify-content: center;
    margin-top: 30px;
}

/* Override generic convert-section spacing for this tool */
.convert-section {
    margin-top: 0;
}

.unlock-actions .btn-primary {
    flex: 0 0 auto;
}

.unlock-actions .btn-secondary {
    position: absolute;
    right: 37px;
    /* Mobile-first default; overridden at wider breakpoints below */
    top: 222px;
}

/* Desktop layout (apply only on large screens so tablets/small laptops don't overlap) */
@media (min-width: 901px) {
    .unlock-actions {
        flex-direction: row;
        justify-content: flex-start;
        margin-top: -66px;
    }
}

/* Clear button vertical position – mobile-first (no gaps between ranges) */
/* Base (<= 359px): top 222px from .unlock-actions .btn-secondary */

@media (min-width: 360px) {
    .unlock-actions .btn-secondary {
        top: 198px;
    }
}

@media (min-width: 460px) {
    .unlock-actions .btn-secondary {
        top: 176px;
    }
}

@media (min-width: 551px) {
    .unlock-actions .btn-secondary {
        top: 175px;
    }
}

@media (min-width: 901px) {
    .unlock-actions .btn-secondary {
        top: 30px; /* Large screens: top right above file details */
    }
}

/* Main button sizing – mobile-first (no gaps, matches clear button breakpoints) */
.unlock-actions .btn-primary {
    flex: 0 0 auto;
    width: 100%;
    justify-content: center;
    padding: 12px 25px;
    font-size: 0.95rem;
}

@media (min-width: 460px) {
    .unlock-actions .btn-primary {
        padding: 13px 30px;
        font-size: 1rem;
    }
}

@media (min-width: 551px) {
    .unlock-actions .btn-primary {
        width: auto;
        justify-content: flex-start;
        padding: 14px 35px;
        font-size: 1.05rem;
    }
}

/* Buttons – match other tools */
.btn-primary {
    background: var(--accent-color);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 50px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.4);
    text-align: center;
}

.btn-primary:hover {
    transform: translateY(-3px);
    background: #f79112;
    box-shadow: 0 6px 20px rgba(247, 145, 18, 0.6);
}

.btn-primary:active {
    transform: translateY(-1px);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-large {
    padding: 18px 50px;
    font-size: 1.2rem;
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-primary);
    border: 2px solid var(--primary-light);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
}

.btn-secondary:hover {
    background-color: var(--primary-light);
    border-color: #f79112;
    transform: translateY(-2px);
}

.progress-container {
    margin-top: 25px;
    animation: fadeIn 0.3s ease;
}

.progress-bar {
    width: 100%;
    height: 30px;
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--primary-light);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.3);
}

.progress-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-color) 0%, #f79112 100%);
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 10px;
    color: white;
    font-weight: bold;
    border-radius: 15px;
}

.progress-text {
    margin-top: 10px;
    color: var(--text-primary);
    font-weight: 600;
    font-size: 1rem;
}

/* Modal Popup */
.pdf-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 9999;
    backdrop-filter: blur(6px);
}

.pdf-modal {
    width: min(560px, 100%);
    background: rgba(15, 20, 25, 0.96);
    border: 2px solid var(--primary-light);
    border-radius: 16px;
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.6);
    overflow: hidden;
}

.pdf-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 18px;
    background: rgba(255, 255, 255, 0.04);
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.pdf-modal-title {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-primary);
}

.pdf-modal-close {
    border: none;
    background: transparent;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.pdf-modal-close:hover {
    color: #f79112;
    background: rgba(247, 145, 18, 0.12);
}

.pdf-modal-message {
    padding: 16px 18px 0 18px;
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
}

.pdf-modal-actions {
    padding: 16px 18px 18px 18px;
    display: flex;
    justify-content: flex-end;
}

/* Instructions Section – identical to other tools (pdf-to-image) */
.instructions-section {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--primary-light);
    border-radius: 20px;
    padding: 40px;
    box-shadow: var(--shadow-md);
    margin-bottom: 40px;
    backdrop-filter: blur(10px);
}

.instructions-section h2 {
    color: var(--text-primary);
    font-size: 2rem;
    margin-bottom: 30px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    font-weight: 800;
}

.instructions-section h2 i {
    color: #f79112;
}

.steps-container {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 30px;
}

.step-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid var(--primary-light);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.step-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(247, 145, 18, 0.3);
    border-color: #f79112;
    background: rgba(255, 255, 255, 0.05);
}

.step-number {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #f79112 0%, #ff6b35 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    flex-shrink: 0;
    box-shadow: 0 4px 15px rgba(247, 145, 18, 0.4);
}

.step-content h3 {
    color: var(--text-primary);
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.2rem;
    font-weight: 700;
}

.step-content p {
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.6;
}

/* FAQ Section – identical to other tools (pdf-to-image) */
.faq-section {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid var(--primary-light);
    border-radius: 20px;
    padding: 40px;
    box-shadow: var(--shadow-md);
    margin-bottom: 40px;
    backdrop-filter: blur(10px);
}

.faq-section h2 {
    color: var(--text-primary);
    font-size: 2rem;
    margin-bottom: 30px;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    font-weight: 800;
}

.faq-section h2 i {
    color: #f79112;
}

.faq-container {
    max-width: 900px;
    margin: 0 auto;
}

.faq-item-pdf {
    margin-bottom: 15px;
    border: 2px solid var(--primary-light);
    border-radius: 8px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
    transition: all 0.3s ease;
}

.faq-item-pdf:hover {
    border-color: #f79112;
}

.faq-question-pdf {
    padding: 15px 15px 15px 40px;
    background-color: rgba(255, 255, 255, 0.05);
    cursor: pointer;
    font-weight: 600;
    color: var(--text-primary);
    position: relative;
    font-size: 1.1em;
    transition: all 0.3s ease;
}

.faq-question-pdf::before {
    content: '+';
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.5em;
    font-weight: normal;
    line-height: 1;
    transition: transform 0.3s ease;
    color: #f79112;
}

.faq-item-pdf.active .faq-question-pdf {
    background-color: rgba(247, 145, 18, 0.2);
    color: var(--text-primary);
    border-bottom: 2px solid #f79112;
}

.faq-item-pdf.active .faq-question-pdf::before {
    content: '-';
    transform: translateY(-50%) rotate(180deg);
}

.faq-answer-pdf {
    background-color: rgba(255, 255, 255, 0.03);
    padding: 0 15px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.5s ease;
}

.faq-item-pdf.active .faq-answer-pdf {
    padding: 15px;
    max-height: 1000px;
}

.faq-answer-pdf p {
    margin: 0;
    font-size: 1.1em;
    line-height: 1.6;
    color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 900px) {
    .password-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 600px) {
    .password-remover-container {
        padding: 14px;
    }

    .upload-section {
        padding: 20px;
    }

    .header-section h1 {
        font-size: 2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .steps-container {
        grid-template-columns: 1fr;
    }

    /* File details - better on small screens */
    .file-info-card {
        padding: 16px;
        margin-top: 24px;
    }

    .file-info-card li {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .file-info-card li span {
        font-size: 0.85rem;
    }

    .file-info-card li strong {
        width: 100%;
        text-align: left;
    }
    
    /* GPU Acceleration for mobile - force hardware acceleration */
    .drop-zone-pdf,
    .password-section,
    .file-info-card {
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
        will-change: transform;
    }
    
    /* Disable expensive backdrop-filter on mobile for performance */
    .upload-section,
    .instructions-section,
    .faq-section,
    .pdf-modal-overlay {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
    
    /* Adjust background since backdrop-filter is removed */
    .upload-section,
    .instructions-section,
    .faq-section {
        background: rgba(255, 255, 255, 0.08);
    }
}

@media (max-width: 480px) {
    .header-section h1 {
        font-size: 1.6rem;
        gap: 10px;
    }

    .subtitle {
        font-size: 0.95rem;
    }

    .drop-zone-pdf h3 {
        font-size: 1.25rem;
    }

    .btn-primary {
        font-size: 0.95rem;
        padding: 12px 24px;
    }

    .btn-secondary {
        font-size: 0.9rem;
        padding: 8px 14px;
        justify-content: center;
    }

    .instructions-section h2,
    .faq-section h2 {
        font-size: 1.5rem;
        gap: 10px;
    }

    .faq-question-pdf {
        font-size: 1rem;
    }

    .faq-answer-pdf p {
        font-size: 1rem;
    }
    
    /* Additional GPU acceleration for very small screens */
    .step-item,
    .faq-item-pdf {
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
    }
    
    /* Force GPU layer for buttons */
    .btn-primary,
    .btn-secondary {
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
    }
}

