/* split-pdf.css - Styles for PDF Splitter Pro */

/* Base Styles */
:root {
    --primary: #4361ee;
    --primary-dark: #3a56d4;
    --secondary: #3f37c9;
    --success: #4cc9f0;
    --danger: #f72585;
    --warning: #f8961e;
    --info: #4895ef;
    --light: #f8f9fa;
    --dark: #212529;
    --gray: #6c757d;
    --light-gray: #e9ecef;
    --white: #ffffff;
    --black: #000000;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background-color: #f5f7fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.headerp {
    text-align: center;
    margin: 1rem 0;
    padding: 1rem 1rem;
    background: linear-gradient(135deg, #4361ee 0%, #3f37c9 100%);
    color: white;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
}

.headerp h1 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.headerp p {
    font-size: 1rem;
    opacity: 0.9;
    max-width: 700px;
    margin: 0 auto;
}

/* Tool Container */
.tool-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
    margin-bottom: 40px;
}

@media (min-width: 992px) {
    .tool-container {
        grid-template-columns: 1fr 1fr;
        align-items: start;
    }
}

/* Panel Styles */
.panel {
    background-color: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.panel:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 25px;
    background-color: var(--primary);
    color: white;
}

.panel-title {
    display: flex;
    align-items: center;
    font-weight: 600;
    font-size: 1.1rem;
}

.panel-title i {
    margin-right: 12px;
    font-size: 1.2rem;
}

/* Upload Section */
.upload-section {
    padding: 40px 25px;
    text-align: center;
}

.upload-option {
    border: 2px dashed rgba(67, 97, 238, 0.3);
    border-radius: 10px;
    padding: 40px 30px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    background-color: rgba(67, 97, 238, 0.03);
}

.upload-option:hover {
    border-color: var(--primary);
    background-color: rgba(67, 97, 238, 0.08);
}

.upload-icon {
    font-size: 3rem;
    color: var(--primary);
    margin-bottom: 20px;
    opacity: 0.8;
}

.upload-text {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--dark);
}

.upload-subtext {
    font-size: 0.95rem;
    color: var(--gray);
    margin-bottom: 20px;
}

#fileInput {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    opacity: 0;
    cursor: pointer;
}

/* File Info */
.file-info-container {
    padding: 25px;
    border-top: 1px solid var(--light-gray);
    display: none;
}

.file-preview {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.file-preview-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(67, 97, 238, 0.1);
    border-radius: 8px;
    margin-right: 15px;
    color: var(--primary);
    font-size: 1.5rem;
}

.file-preview-details {
    flex: 1;
}

.file-preview-name {
    font-weight: 600;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.file-preview-meta {
    display: flex;
    gap: 15px;
    font-size: 0.9rem;
    color: var(--gray);
}

.file-preview-meta span {
    display: flex;
    align-items: center;
}

.file-preview-meta i {
    margin-right: 5px;
    font-size: 0.9rem;
}

/* Options Container */
.options-container {
    padding: 0 25px 25px;
}

.option-group {
    margin-bottom: 25px;
}

.option-group-title {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    font-weight: 600;
    color: var(--dark);
}

.option-group-title i {
    margin-right: 10px;
    color: var(--primary);
}

/* Split Method Options */
.split-method {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.method-option {
    flex: 1;
    padding: 15px;
    border: 2px solid var(--light-gray);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.method-option:hover {
    border-color: var(--primary);
    background-color: rgba(67, 97, 238, 0.05);
}

.method-option.active {
    border-color: var(--primary);
    background-color: rgba(67, 97, 238, 0.1);
}

.method-icon {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 10px;
}

.method-title {
    font-weight: 600;
    margin-bottom: 5px;
}

.method-desc {
    font-size: 0.9rem;
    color: var(--gray);
}

/* Range Input */
.range-input-container {
    margin-top: 20px;
}

.range-input-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.range-input-group label {
    font-weight: 500;
    min-width: 120px;
}

.range-input-group input {
    padding: 10px 15px;
    border: 1px solid var(--light-gray);
    border-radius: 6px;
    flex: 1;
    max-width: 100px;
}

.range-note {
    font-size: 0.85rem;
    color: var(--gray);
    font-style: italic;
    margin-top: 10px;
}

/* Page Selection */
.page-selection-container {
    margin-top: 20px;
    display: none;
}

.page-selection-input {
    margin-bottom: 15px;
}

.page-selection-input label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
}

.page-selection-input input {
    padding: 10px 15px;
    border: 1px solid var(--light-gray);
    border-radius: 6px;
    width: 100%;
    max-width: 400px;
}

.page-selection-example {
    font-size: 0.85rem;
    color: var(--gray);
    margin-top: 5px;
}

/* Checkbox Options */
.checkbox-option {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.checkbox-option input {
    margin-right: 10px;
}

/* Controls */
.controls {
    display: flex;
    justify-content: space-between;
    padding: 0 25px 25px;
    gap: 15px;
}

/* Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-size: 0.95rem;
}

.btn i {
    margin-right: 8px;
}

.btn-sm {
    padding: 8px 14px;
    font-size: 0.9rem;
}

.btn-primary {
    background-color: white;
    color: var(--primary);
    font-weight: 600;
}

.btn-primary:hover {
    background-color: rgba(255,255,255,0.9);
}

.btn-secondary {
    background-color: rgba(255,255,255,0.1);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
}

.btn-secondary:hover {
    background-color: rgba(255,255,255,0.2);
}

.btn-danger {
    background-color: var(--danger);
    color: white;
}

.btn-danger:hover {
    background-color: #e5177b;
}

.btn-reset {
    background-color: var(--light-gray);
    color: var(--dark);
}

.btn-reset:hover {
    background-color: #e2e6ea;
}

.btn-split {
    background-color: var(--primary);
    color: white;
}

.btn-split:hover {
    background-color: var(--primary-dark);
}

.btn-split:disabled {
    background-color: var(--gray);
    cursor: not-allowed;
    opacity: 0.7;
}

/* Results Section */
.results-container {
    background-color: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    margin-bottom: 40px;
    overflow: hidden;
    display: none;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 25px;
    background-color: var(--primary);
    color: white;
}

.results-title {
    display: flex;
    align-items: center;
    font-weight: 600;
    font-size: 1.1rem;
}

.results-title i {
    margin-right: 10px;
    font-size: 1.1rem;
}

.results-count {
    background-color: rgba(255,255,255,0.2);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.85rem;
}

.results-content {
    padding: 25px;
}

.results-summary {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--light-gray);
}

.results-summary-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(67, 97, 238, 0.1);
    border-radius: 50%;
    margin-right: 20px;
    color: var(--primary);
    font-size: 1.8rem;
}

.results-summary-text h3 {
    font-size: 1.2rem;
    margin-bottom: 5px;
    color: var(--dark);
}

.results-summary-text p {
    color: var(--gray);
}

.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.result-item {
    border: 1px solid var(--light-gray);
    border-radius: 10px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.result-item:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-sm);
}

.result-item-header {
    padding: 15px;
    background-color: var(--light);
    border-bottom: 1px solid var(--light-gray);
    display: flex;
    align-items: center;
}

.result-item-icon {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(67, 97, 238, 0.1);
    border-radius: 6px;
    margin-right: 12px;
    color: var(--primary);
    font-size: 1.2rem;
}

.result-item-title {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.result-item-body {
    padding: 15px;
}

.result-item-meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.result-item-pages {
    color: var(--primary);
    font-weight: 500;
}

.result-item-size {
    color: var(--gray);
}

.result-item-actions {
    display: flex;
    gap: 10px;
}

.result-item-btn {
    flex: 1;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.download-btn {
    background-color: var(--primary);
    color: white;
    border: none;
}

.download-btn:hover {
    background-color: var(--primary-dark);
}

.preview-btn {
    background-color: white;
    color: var(--primary);
    border: 1px solid var(--primary);
}

.preview-btn:hover {
    background-color: rgba(67, 97, 238, 0.1);
}

/* Info Container */
.info-container {
    background-color: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    padding: 30px;
    margin-bottom: 40px;
}

.info-header {
    display: flex;
    align-items: center;
    margin-bottom: 25px;
    color: var(--primary);
}

.info-header i {
    font-size: 1.8rem;
    margin-right: 15px;
}

.info-header h2 {
    font-size: 1.5rem;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

@media (min-width: 768px) {
    .info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1200px) {
    .info-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.info-card {
    background-color: var(--light);
    border-radius: 10px;
    padding: 25px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-sm);
}

.info-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(67, 97, 238, 0.1);
    border-radius: 50%;
    margin-bottom: 15px;
    color: var(--primary);
    font-size: 1.5rem;
}

.info-card h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--dark);
}

.info-card p {
    font-size: 0.95rem;
    color: var(--gray);
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    padding: 15px 25px;
    border-radius: 8px;
    background-color: var(--dark);
    color: var(--white);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    transform: translateX(150%);
    transition: transform 0.3s ease;
    max-width: 350px;
}

.toast.show {
    transform: translateX(0);
}

.toast.success {
    background-color: #2ecc71;
}

.toast.error {
    background-color: var(--danger);
}

.toast.warning {
    background-color: var(--warning);
}

.toast.info {
    background-color: var(--info);
}

.toast i {
    margin-right: 12px;
    font-size: 1.2rem;
}

.toast-close {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    margin-left: 20px;
    font-size: 1.1rem;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.toast-close:hover {
    opacity: 1;
}

/* Drag and drop styling */
.upload-option.drag-over {
    border-color: var(--primary);
    background-color: rgba(67, 97, 238, 0.1);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    header h1 {
        font-size: 1.8rem;
    }
    
    header p {
        font-size: 1rem;
    }
    
    .panel-header {
        padding: 15px 20px;
    }
    
    .upload-section {
        padding: 30px 20px;
    }
    
    .upload-option {
        padding: 30px 20px;
    }
    
    .split-method {
        flex-direction: column;
    }
    
    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .toast {
        max-width: 280px;
        padding: 12px 20px;
    }
}