/* Add Watermark to PDF Tool Specific Styles */

/* Add Watermark PDF Page Specific Styles */

.add-watermark-pdf-section {
    padding: 40px 0;
    min-height: 350px;
    background: white;
}

.add-watermark-pdf-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.main-body .add-watermark-pdf-section {
    padding-top: 16px;
}

/* Upload State */
.upload-state {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100px;
}

.upload-box {
    background: linear-gradient(135deg, #667eea 0%, #2563eb 100%);
    border-radius: 20px;
    padding: 20px 20px;
    text-align: center;
    color: white;
    width: 800px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-box:hover {
    transform: translateY(-5px);
    border-color: #e0e7ff;
}

.upload-box.drag-over {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    border-color: #fbbf24;
    transform: scale(1.02);
}

.upload-icon {
    margin-bottom: 30px;
    opacity: 0.9;
}

.upload-icon svg {
    width: 80px;
    height: 80px;
    stroke: white;
}

.upload-box h2 {
    font-size: 32px;
    margin-bottom: 15px;
    font-weight: 600;
}

.upload-box p {
    font-size: 18px;
    margin-bottom: 30px;
    opacity: 0.9;
}

.upload-btn {
    background: white;
    color: #667eea;
    padding: 15px 40px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.upload-btn:hover {
    background: #f1f5f9;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255, 255, 255, 0.2);
}

.upload-subtext {
    font-size: 16px;
    opacity: 0.8;
    margin: 0;
}

/* Editor State */
.editor-state {
    background: #f8fafc;
    border-radius: 12px;
    overflow: hidden;
    width: 100%;
    max-width: 1200px;
}

/* Toolbar */
.watermark-toolbar {
    background: white;
    border-bottom: 1px solid #e2e8f0;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.toolbar-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #475569;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.toolbar-btn:hover {
    background: #e2e8f0;
    color: #1e293b;
    transform: translateY(-1px);
}

.toolbar-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.toolbar-btn.btn-primary {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

.toolbar-btn.btn-primary:hover:not(:disabled) {
    background: #1d4ed8;
    border-color: #1d4ed8;
}

.toolbar-btn.btn-success {
    background: #16a34a;
    color: white;
    border-color: #16a34a;
}

.toolbar-btn.btn-success:hover:not(:disabled) {
    background: #15803d;
    border-color: #15803d;
}

.toolbar-btn svg {
    width: 20px;
    height: 20px;
}

.toolbar-spacer {
    flex: 1;
}

/* Main Content Area */
.watermark-content {
    display: flex;
    gap: 20px;
    padding: 20px;
    min-height: 600px;
}

/* Settings Panel */
.settings-panel {
    flex: 0 0 350px;
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    overflow-y: auto;
    max-height: 600px;
}

.settings-panel h3 {
    margin-bottom: 20px;
    color: #1e293b;
    font-size: 18px;
    font-weight: 600;
}

.setting-group {
    margin-bottom: 20px;
}

.setting-group label {
    display: block;
    margin-bottom: 8px;
    color: #374151;
    font-weight: 500;
    font-size: 14px;
}

.setting-group input[type="text"] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    transition: border-color 0.2s ease;
}

.setting-group input[type="text"]:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Radio Group */
.radio-group {
    display: flex;
    gap: 15px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #374151;
}

.radio-option input[type="radio"] {
    margin: 0;
}

.radio-option input[type="radio"]:checked + span {
    color: #2563eb;
    font-weight: 500;
}

/* Slider Container */
.slider-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.slider-container input[type="range"] {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: #e2e8f0;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.slider-container input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #2563eb;
    cursor: pointer;
    transition: background 0.2s ease;
}

.slider-container input[type="range"]::-webkit-slider-thumb:hover {
    background: #1d4ed8;
}

.slider-container input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #2563eb;
    cursor: pointer;
    border: none;
    transition: background 0.2s ease;
}

.slider-container input[type="range"]::-moz-range-thumb:hover {
    background: #1d4ed8;
}

.slider-value {
    min-width: 50px;
    text-align: right;
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
}

/* Color Input Container */
.color-input-container {
    display: flex;
    gap: 8px;
    align-items: center;
}

.color-input-container input[type="color"] {
    width: 50px;
    height: 38px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    cursor: pointer;
    padding: 2px;
}

.color-input-container input[type="color"]:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.color-text {
    flex: 1;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    font-family: monospace;
}

.color-text:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* Image Upload Container */
.image-upload-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.image-preview {
    position: relative;
    display: inline-block;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    overflow: hidden;
    width: 100px;
    height: 100px;
}

.image-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.remove-image-btn {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: none;
    background: #ef4444;
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    transition: background 0.2s ease;
}

.remove-image-btn:hover {
    background: #dc2626;
}

/* Position Grid */
.position-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 8px;
}

.position-btn {
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.position-btn:hover {
    background: #f8fafc;
    border-color: #2563eb;
    transform: translateY(-1px);
}

.position-btn.active {
    background: #2563eb;
    color: white;
    border-color: #2563eb;
}

/* Preview Panel */
.preview-panel {
    flex: 1;
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.preview-panel h3 {
    margin-bottom: 20px;
    color: #1e293b;
    font-size: 18px;
    font-weight: 600;
}

.preview-container {
    flex: 1;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    background: #f8fafc;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.preview-canvas {
    max-width: 100%;
    max-height: 100%;
    display: block;
    margin: auto;
}

.no-preview {
    text-align: center;
    color: #64748b;
    padding: 40px;
}

.no-preview svg {
    width: 80px;
    height: 80px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.no-preview h4 {
    font-size: 18px;
    margin-bottom: 10px;
    color: #475569;
}

.no-preview p {
    font-size: 14px;
    margin-bottom: 0;
}

.preview-info {
    margin-top: 15px;
    padding: 15px;
    background: #f8fafc;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.preview-info p {
    margin: 0;
    color: #374151;
    font-size: 14px;
}

.page-navigation {
    display: flex;
    gap: 10px;
}

.nav-btn {
    padding: 8px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
}

.nav-btn:hover:not(:disabled) {
    background: #f8fafc;
    border-color: #2563eb;
    transform: translateY(-1px);
}

.nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Watermark Type Settings */
.watermark-type-settings {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

/* How to Add Watermark to PDF Section */
.how-to-add-watermark-pdf {
    padding: 40px 0;
    background: #ffffff;
}

.how-to-add-watermark-pdf .section-title {
    margin-bottom: 50px;
}

.steps-grid {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.step-card {
    flex: 1 1 220px;
    max-width: 320px;
    text-align: center;
}

.step-number {
    width: 56px;
    height: 56px;
    border-radius: 9999px;
    margin: 0 auto 16px;
    background: #2563eb;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 24px;
}

.step-card h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #1e293b;
}

.step-card p {
    font-size: 15px;
    color: #64748b;
    line-height: 1.6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .add-watermark-pdf-section {
        padding: 20px 0;
    }
    
    .upload-box {
        padding: 40px 20px;
        margin: 0 10px;
        width: 650px;
    }
    
    .upload-box h2 {
        font-size: 24px;
    }
    
    .upload-box p {
        font-size: 16px;
    }
    
    .watermark-toolbar {
        padding: 10px;
        gap: 5px;
    }
    
    .toolbar-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .toolbar-btn span {
        display: none;
    }
    
    .watermark-content {
        flex-direction: column;
        padding: 10px;
    }
    
    .settings-panel {
        flex: none;
        max-height: none;
        max-width: 100%;
    }
    
    .preview-panel {
        min-height: 400px;
    }
}

@media (max-width: 480px) {
    .upload-box {
        padding: 30px 15px;
        width: 350px;
    }
    
    .upload-box h2 {
        font-size: 20px;
    }
    
    .watermark-toolbar {
        justify-content: center;
    }
    
    .toolbar-spacer {
        display: none;
    }
    
    .position-grid {
        gap: 5px;
    }
    
    .position-btn {
        padding: 8px;
        font-size: 14px;
    }
    
    .preview-info {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .page-navigation {
        justify-content: center;
    }
}
