/**
 * MCTS Frontend Image Cropper Styles
 */

/* Modal overlay and container */
.mcts-crop-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    box-sizing: border-box;
}

.mcts-crop-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.75);
}

/* Modal content box */
.mcts-crop-modal-content {
    position: relative;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Header */
.mcts-crop-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
}

.mcts-crop-modal-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #111827;
}

.mcts-crop-modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: background 0.2s, color 0.2s;
}

.mcts-crop-modal-close:hover {
    background: #e5e7eb;
    color: #111827;
}

/* Instructions */
.mcts-crop-modal-instructions {
    padding: 16px 24px;
    background: #eff6ff;
    border-bottom: 1px solid #bfdbfe;
}

.mcts-crop-modal-instructions p {
    margin: 0;
    font-size: 15px;
    line-height: 1.5;
    color: #1e40af;
}

/* Body with cropper */
.mcts-crop-modal-body {
    padding: 24px;
    flex: 1;
    overflow: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
}

.mcts-crop-container {
    width: 100%;
    max-width: 500px;
    background: #1f2937;
    border-radius: 8px;
    overflow: hidden;
}

.mcts-crop-container img {
    display: block;
    max-width: 100%;
}

/* Footer with buttons */
.mcts-crop-modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding: 20px 24px;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
}

.mcts-crop-cancel,
.mcts-crop-save {
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.mcts-crop-cancel {
    background: #ffffff;
    border: 1px solid #d1d5db;
    color: #374151;
}

.mcts-crop-cancel:hover {
    background: #f3f4f6;
}

.mcts-crop-save {
    background: #2563eb;
    border: 1px solid #2563eb;
    color: #ffffff;
}

.mcts-crop-save:hover {
    background: #1d4ed8;
}

.mcts-crop-save:active,
.mcts-crop-cancel:active {
    transform: scale(0.98);
}

/* Cropper.js overrides for better visibility */
.cropper-view-box {
    outline: 3px solid #2563eb;
    outline-offset: -3px;
}

.cropper-point {
    background-color: #2563eb;
    width: 12px !important;
    height: 12px !important;
}

.cropper-line {
    background-color: #2563eb;
}

.cropper-dashed {
    border-color: rgba(255, 255, 255, 0.5);
}

/* Mobile responsiveness */
@media (max-width: 640px) {
    .mcts-crop-modal {
        padding: 10px;
    }

    .mcts-crop-modal-header {
        padding: 16px;
    }

    .mcts-crop-modal-header h2 {
        font-size: 18px;
    }

    .mcts-crop-modal-instructions {
        padding: 12px 16px;
    }

    .mcts-crop-modal-instructions p {
        font-size: 14px;
    }

    .mcts-crop-modal-body {
        padding: 16px;
    }

    .mcts-crop-modal-footer {
        padding: 16px;
        flex-direction: column;
    }

    .mcts-crop-cancel,
    .mcts-crop-save {
        width: 100%;
        text-align: center;
    }

    .mcts-crop-save {
        order: -1;
    }
}
