/* Image to PDF Section */
.image2pdf-hero {
    background-color: white;
    color: var(--dark);
    padding: 2rem;
    text-align: center;
    border-radius: 12px;
    margin-bottom: 2rem;
    box-shadow: var(--card-shadow);
}

.image2pdf-options {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.image2pdf-option-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 160px;
}

.image2pdf-option-group label {
    font-size: 0.9rem;
    color: var(--gray);
    font-weight: 500;
    text-align: left;
}

.image2pdf-select {
    padding: 0.75rem 1rem;
    background-color: white;
    color: var(--dark);
    border: 1px solid var(--light-gray);
    border-radius: 8px;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.image2pdf-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(67, 97, 238, 0.2);
}

/* Image Preview Area */
.image2pdf-preview-area {
    background-color: white;
    border-radius: 12px;
    padding: 2rem;
    margin-bottom: 1.5rem;
    min-height: 300px;
    border: 1px dashed var(--light-gray);
    transition: all 0.3s ease;
    text-align: center;
}

.image2pdf-preview-area:hover {
    border-color: var(--primary);
    background-color: rgba(67, 97, 238, 0.03);
}

.upload-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.upload-area p {
    color: var(--gray);
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
}

/* Results Section */
.image2pdf-results {
    width: 100%;
    display: none;
}

/* Preview Grid Container */
.image2pdf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1.5rem;
    width: 100%;
    margin-bottom: 1.5rem;
}

/* Preview Item Styling */
.image2pdf-item {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--light-gray);
}

.image2pdf-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--card-hover);
}

.image2pdf-image-container {
    position: relative;
    width: 100%;
    height: 150px;
    background-color: #f8f9fa;
}

.image2pdf-preview-image {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #f8f9fa;
}

.image2pdf-remove-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--warning);
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0.9;
    transition: all 0.2s ease;
}

.image2pdf-remove-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}

.image2pdf-info {
    padding: 12px;
    color: var(--dark);
    border-top: 1px solid var(--light-gray);
}

.image2pdf-filename {
    font-size: 0.85rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
}

.image2pdf-filesize {
    font-size: 0.75rem;
    color: var(--gray);
}

/* Add More Images Button */
.image2pdf-add-btn {
    background-color: white;
    color: var(--primary);
    border: 1px solid var(--primary);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 1rem auto 0;
    transition: all 0.2s ease;
}

.image2pdf-add-btn:hover {
    background-color: rgba(67, 97, 238, 0.1);
}

.image2pdf-rotate-btn {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0.9;
    transition: all 0.2s ease;
}

.image2pdf-rotate-btn:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* Action Buttons */
#image-actions {
    display: none;
    justify-content: space-between;
    margin-top: 1.5rem;
    gap: 1rem;
}

.btn-clear {
    background-color: white;
    color: var(--warning);
    border: 1px solid var(--warning);
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.btn-clear:hover {
    background-color: rgba(247, 37, 133, 0.1);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .image2pdf-options {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .image2pdf-option-group {
        width: 100%;
        max-width: 300px;
    }
    
    .image2pdf-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    #image-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .image2pdf-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .image2pdf-image-container {
        height: 120px;
    }
}