/* Custom Styling for PDF Studio Pro */

/* Hiệu ứng mờ dần */
@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

.animate-fadeIn {
    animation: fadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Card Trang */
.page-card {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    user-select: none;
}

.page-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 15px 30px -10px rgba(148, 163, 184, 0.3);
}

/* Khi đang kéo */
.page-card.dragging {
    opacity: 0.4;
    transform: scale(0.9);
    border: 2px dashed #3b82f6 !important;
}

/* Nút công cụ trên Card */
.page-card-overlay {
    background: linear-gradient(to top, rgba(15, 23, 42, 0.9) 0%, rgba(15, 23, 42, 0.4) 60%, rgba(15, 23, 42, 0) 100%);
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}

.page-card:hover .page-card-overlay {
    opacity: 1;
}

/* Luôn hiện trên màn hình cảm ứng */
@media (hover: none) {
    .page-card-overlay {
        opacity: 1;
        background: linear-gradient(to top, rgba(15, 23, 42, 0.95) 0%, rgba(15, 23, 42, 0.6) 80%);
    }
}

/* Hiệu ứng Xoay ảnh preview dựa trên thuộc tính CSS rotation */
.rotate-0 {
    transform: rotate(0deg);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.rotate-90 {
    transform: rotate(90deg);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.rotate-180 {
    transform: rotate(180deg);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.rotate-270 {
    transform: rotate(270deg);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Đảm bảo tỉ lệ khung hình thumbnail */
.thumbnail-wrapper {
    aspect-ratio: 3 / 4;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8fafc;
}

.thumbnail-wrapper img, .thumbnail-wrapper canvas {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

/* Vùng Kéo thả */
#drop-zone.dragover {
    border-color: #3b82f6;
    background-color: #eff6ff;
    transform: scale(0.98);
}

/* Vạch kẻ chỉ vị trí thả (drop indicator) */
.drop-indicator {
    height: 4px;
    background-color: #3b82f6;
    border-radius: 2px;
    margin: 4px 0;
    transition: all 0.2s ease;
}

/* Thiết lập Dashicons trong Shortcode */
.hihi-pdf-studio .dashicons {
    font-family: dashicons;
    display: inline-block;
    width: 20px;
    height: 20px;
    font-size: 20px;
    line-height: 1;
    text-decoration: none;
    text-align: center;
    vertical-align: top;
}
