@import url("toolbar.css");

.app-body { background: #f8fafc; color: #1a1a1a; font-family: 'Inter', sans-serif; line-height: 1.5; }
.app-body :where(button, input) { font-family: inherit; line-height: inherit; }
.app-body :where(#dropdown-menu, #settings-modal) :where(p, h4) { margin: 0; }
.app-body :where(#dropdown-menu, #settings-modal) a { text-decoration: none; }
.settings-modal-close svg { width: 1rem; height: 1rem; }
.theme-toggle-icon { width: 1.25rem; height: 1.25rem; margin-right: .5rem; }
html.dark .app-body { background: #212020; color: #fff; }
html.dark ::-webkit-scrollbar { width: 12px; height: 12px; }
html.dark ::-webkit-scrollbar-track { background: #212020; }
html.dark ::-webkit-scrollbar-thumb { background-color: #fff; border-radius: 6px; border: 3px solid #212020; }
.app-body .valo-toolbox-link { position: fixed; top: 8px; right: 50px; z-index: 9999; }
.app-body .toolbar-button, .app-body .dropdown-button { height: 30px; }
.main-toolbar .relative { position: relative; }
.app-body #dropdown-menu { left: 0; }
.pdf-toolbar-content { display: flex; flex-direction: column; flex-grow: 1; justify-content: center; }
.pdf-toolbar-top-row { display: flex; justify-content: space-between; align-items: center; width: 100%; }
.pdf-toolbar-top-left { margin-top: -20px; margin-bottom: -13px; }
.pdf-toolbar-top-right { margin-top: 10px; }
.pdf-toolbar-top-spacer { width: 100%; height: 24px; visibility: hidden; }
.pdf-toolbar-bottom-row { display: flex; justify-content: space-between; }
.pdf-toolbar-primary-group { display: flex; align-items: center; margin-top: -10px; margin-bottom: 15px; }
.pdf-toolbar-primary-row { display: flex; align-items: center; }
.pdf-toolbar-control-space { display: flex; align-items: center; min-width: 500px; }
.pdf-primary-toolbar-action { margin-left: 9.5rem; margin-top: -5px; }
.pdf-primary-toolbar-action:disabled { color: #9ca3af !important; }
.copyright-footer { position: absolute; bottom: 20px; left: 0; right: 0; text-align: center; font-size: .875rem; color: #6b7280; }
.dark .copyright-footer { color: #9ca3af; }
.uploadsection { flex: 1 1 0%; display: flex; align-items: center; justify-content: center; margin-bottom: 150px; }
.pdf-upload-content { text-align: center; max-width: 100%; }
.pdf-upload-description { margin: 0; font-size: 1.125rem; line-height: 1.75rem; color: #4b5563; }
.dark .pdf-upload-description { color: #9ca3af; }
#drop-area { margin-top: 2rem; border: 4px solid #d1d5db; border-radius: .75rem; padding: 3rem; cursor: pointer; transition: background-color .15s; background: #7F1D1D; }
.dark #drop-area { border-color: #4b5563; background: #1a1a1a; }
#drop-area:hover, #drop-area.dragover { background: #DC2626; }
.dark #drop-area:hover, .dark #drop-area.dragover { background: #780c0c; }
#drop-area:focus-visible { outline: 3px solid #DC2626; outline-offset: 3px; }
#drop-area[aria-disabled="true"] { cursor: not-allowed; opacity: .6; }
#drop-area-text { color: white; margin: 0; font-size: 1rem; line-height: 1.5rem; }
#upload-progress-container { margin-top: 1rem; width: 100%; background: #e5e7eb; border-radius: 9999px; height: 1rem; }
.dark #upload-progress-container { background: #374151; }
#upload-progress-bar { background: #DC2626; height: 1rem; border-radius: 9999px; font-size: .75rem; color: white; text-align: center; line-height: 1; }
#upload-status-text { margin: .5rem 0 0; font-size: .875rem; line-height: 1.25rem; color: #6b7280; }
@media (max-width: 859px) {
    .app-body #dropdown-menu { left: 0; min-width: 0; width: min(360px, calc(100vw - 24px)); }
    .app-body .menu-shell { min-width: 0; }
    .app-body .menu-help-dropdown { position: static; width: 100%; margin-top: 8px; }
    .app-body .menu-help-dropdown::before { display: none; }
    .app-body .valo-toolbox-link { top: 10px; right: 10px; z-index: 62; }
    .app-body .valo-toolbox-link img { height: 40px; }
    .uploadsection { padding: 1rem; }
    .pdfsplitterh1 { font-size: 1.9rem !important; }
    #drop-area { padding: 2rem 1rem; }
    .pdf-primary-toolbar-action { margin-left: 0; margin-top: 0; }
    .pdf-toolbar-top-left { margin: 0; }
}

        .pdfsplitterh1 {
            margin-top: 0;
            font-size: 3.6rem; 
				font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; 
                line-height: 3.6rem;
				font-weight: 700;
				color: #DC2626;
				margin-bottom:40px;
				position: relative;
				display: inline-block; 
		}
		
        .pdfsplitterh1::after { content: ''; position: absolute; bottom: -35px; left: 0; width: 100%; height: 40px; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M203.371.916c-26.013-2.078-76.686 1.963-124.73 9.946L67.3 12.749C35.421 18.062 18.2 21.766 6.004 25.934 1.244 27.561.828 27.778.874 28.61c.07 1.214.828 1.121 9.595-1.176 9.072-2.377 17.15-3.92 39.246-7.496C123.565 7.986 157.869 4.492 195.942 5.046c7.461.108 19.25 1.696 19.17 2.582-.107 1.183-7.874 4.31-25.75 10.366-21.992 7.45-35.43 12.534-36.701 13.884-2.173 2.308-.202 4.407 4.442 4.734 2.654.187 3.263.157 15.593-.78 35.401-2.686 57.944-3.488 88.365-3.143 46.327.526 75.721 2.23 130.788 7.584 19.787 1.924 20.814 1.98 24.557 1.332l.066-.011c1.201-.203 1.53-1.825.399-2.335-2.911-1.31-4.893-1.604-22.048-3.261-57.509-5.556-87.871-7.36-132.059-7.842-23.239-.254-33.617-.116-50.627.674-11.629.54-42.371 2.494-46.696 2.967-2.359.259 8.133-3.625 26.504-9.81 23.239-7.825 27.934-10.149 28.304-14.005.417-4.348-3.529-6-16.878-7.066Z' fill='%23FEE2E2'/%3E%3C/svg%3E"); background-size: contain; background-repeat: no-repeat; background-position: left center; clip-path: inset(0 100% 0 0); animation: drawLine 3s ease-out forwards; }
		
		
        @keyframes drawLine { 0% { clip-path: inset(0 100% 0 0); } 100% { clip-path: inset(0 0% 0 0); } }
        .splitpdfbutton { width: 100%; min-height: 60px; display: flex; align-items: center; justify-content: center; gap: 0.75rem; color: #fff; background-color: #7F1D1D; font-weight: 700; border-radius: 0.5rem; font-size: 1rem; padding: 1rem 1.25rem; text-align: center; border: none; cursor: pointer; position: relative; overflow: hidden; }
        .splitpdfbutton:hover { background-color: #DC2626; }
        .splitpdfbutton:focus { outline: 2px solid transparent; outline-offset: 2px; box-shadow: 0 0 0 4px #FEE2E2; }
        .splitpdfbutton:disabled { background-color: #9ca3af; cursor: not-allowed; }
        @media (prefers-color-scheme: dark) { .dark .splitpdfbutton { background-color: #DC2626; } .dark .splitpdfbutton:hover { background-color: #7F1D1D; } .dark .splitpdfbutton:focus { box-shadow: 0 0 0 4px #7F1D1D; } .dark .splitpdfbutton:disabled { background-color: #4b5563; } }
        .dark .tab-nav-button.active { color: #FEE2E2; border-color: #FEE2E2; }
        .tab-nav-button { width: 50%; padding: 1rem 0.25rem; text-align: center; border-bottom: 2px solid transparent; font-weight: 500; font-size: 0.875rem; color: #7F1D1D; }
        .tab-nav-button:hover { color: #DC2626; border-color: #DC2626; }
        @media (prefers-color-scheme: dark) { .dark .tab-nav-button { color: #9ca3af; } .dark .tab-nav-button:hover { color: #fff; border-color: #6b7280; } }
        .tab-nav-button.active { color: #dc2626; border-color: #dc2626; }

        #flex-prompt-save-btn { color: white; background-color: #DC2626; }
        #flex-prompt-save-btn:hover { background-color: #7F1D1D; }
        .progress-button { position: relative; overflow: hidden; z-index: 0; isolation: isolate; }
        .progress-button .progress-bar-content { position: relative; z-index: 2; display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 100%; color: white; overflow: hidden; flex-wrap: nowrap; }
        .progress-button .progress-bar-content > span:last-child { display: block; min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
        .progress-button.loading { cursor: not-allowed; pointer-events: none; }
        .progress-button.loading .progress-bar-content > span:last-child { animation: loadingPulse 2.2s ease-in-out infinite; }
        .split-btn-bg-svg {
            position: absolute;
            inset: 0;
            width: 100%;
            height: 100%;
            z-index: 0;
            pointer-events: none;
        }
        .split-btn-bg-svg rect {
            x: 2px;
            y: 2px;
            width: calc(100% - 4px);
            height: calc(100% - 4px);
            rx: 6px;
        }
        .bg-rect-base {
            fill: #7F1D1D;
            transition: fill 0.25s ease;
        }
        .splitpdfbutton:hover:not(.loading) .bg-rect-base {
            fill: #DC2626;
        }
        .bg-rect-fill {
            fill: #d32f2f;
            clip-path: inset(0 100% 0 0);
            opacity: 0;
            transition: opacity 0.2s ease, clip-path 0.28s linear;
        }
        .progress-rect {
            fill: none;
            stroke: rgba(255,255,255,0.98);
            stroke-width: 3.5px;
            stroke-linecap: round;
            stroke-dasharray: 28 72;
            stroke-dashoffset: 100;
            opacity: 0;
            transition: opacity 0.2s ease;
        }
        #split-pdf-btn.loading,
        #split-pdf-btn.loading:hover,
        #split-pdf-btn.loading:disabled {
            background-color: transparent;
            color: #ffffff;
        }
        #split-pdf-btn.loading .bg-rect-base {
            fill: #d1d5db;
        }
        .dark #split-pdf-btn.loading .bg-rect-base {
            fill: #6b7280;
        }
        #split-pdf-btn.loading .bg-rect-fill {
            opacity: 1;
        }
        #split-pdf-btn.loading .progress-rect {
            opacity: 1;
            animation: borderFlow 1.6s linear infinite;
        }
        #split-pdf-btn.loading .split-btn-icon {
            opacity: 0;
        }
        #toolbar-bottom-row {
            position: relative;
        }
        .global-progress-status {
            position: absolute;
            left: 50%;
            bottom: 0;
            transform: translateX(-50%);
            margin: 0;
            padding: 0;
            font-size: 0.75rem;
            line-height: 1rem;
            font-weight: 600;
            text-align: center;
            color: #7F1D1D;
            z-index: 52;
            pointer-events: none;
            white-space: nowrap;
        }
        .dark .global-progress-status {
            color: #FECACA;
        }
        #global-progress-bar-container { position: absolute; top: 0; left: 0; width: 100%; height: 4px; background-color: #e5e7eb; z-index: 51; opacity: 1; transition: opacity 0.3s ease; }
        .dark #global-progress-bar-container { background-color: #374151; }
        #global-progress-bar-fill { height: 100%; background-color: #DC2626; transition: width 0.4s ease; width: 0%; border-radius: 0 2px 2px 0; }
        #global-progress-bar-container.loading #global-progress-bar-fill {
            background-image: linear-gradient(90deg, rgba(220,38,38,0.65) 0%, rgba(201, 10, 10, 0.95) 35%, rgba(220,38,38,1) 70%, rgba(127,29,29,0.85) 100%);
            background-size: 220% 100%;
            animation: progressFlow 2.1s linear infinite;
        }
        .dark #global-progress-bar-container.loading #global-progress-bar-fill {
            background-image: linear-gradient(90deg, rgba(127,29,29,0.75) 0%, rgba(179, 46, 46, 0.9) 35%, rgba(220,38,38,1) 70%, rgba(127,29,29,0.85) 100%);
        }
        #global-progress-bar-container.hidden { opacity: 0; pointer-events: none; }
        @keyframes progressFlow { from { background-position: 180% 0; } to { background-position: 0% 0; } }
        @keyframes loadingPulse { 0%, 100% { opacity: 0.72; } 50% { opacity: 1; } }
        @keyframes borderFlow { to { stroke-dashoffset: 0; } }