/* Modal Card Styles */
.perfect-photo-modal-card {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: #FFFFFF;
    border-radius: 0;
    border: none;
    box-shadow: none;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.3s ease-out;
    z-index: 1000;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-step-view {
    width: 100%;
    min-height: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
}

.modal-card-top-bar {
    width: 100%;
    padding: 20px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #E2E8F0;
    background: #FFFFFF;
}

.modal-card-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: #0F172A;
}

.top-mode-close-group {
    display: flex;
    align-items: center;
    gap: 16px;
}

.link-manual-mode {
    font-size: 0.9rem;
    font-weight: 600;
    color: #4F46E5;
    text-decoration: none;
    cursor: pointer;
}

.btn-modal-close {
    background: transparent;
    border: none;
    font-size: 1.4rem;
    color: #64748B;
    cursor: pointer;
    line-height: 1;
}

/* Modal Body Layout */
.modal-crop-body-layout {
    width: 100%;
    min-height: 500px;
    flex: 1;
    padding: 24px;
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
    align-items: start;
}

/* Loading Overlay */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(8px);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    z-index: 100;
    border-radius: var(--radius-lg);
}

.loading-overlay.active {
    display: flex;
}

.spinner-ring {
    width: 50px;
    height: 50px;
    border: 3px solid #E2E8F0;
    border-top-color: #4F46E5;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.loading-msg {
    font-weight: 700;
    font-size: 1.05rem;
    color: #4F46E5;
}
