/**
 * Image Cropper Modal Styles for Gravity Forms
 */

/* Modal Overlay */
.nk-cropper-modal {
    display: none;
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    align-items: center;
    justify-content: center;
}

/* Modal Content Container */
.nk-cropper-modal-content {
    background-color: #fff;
    border-radius: 8px;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Modal Header */
.nk-cropper-header {
    padding: 20px 24px;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.nk-cropper-header-text {
    flex: 1;
    min-width: 0;
}

.nk-cropper-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #23282d;
}

.nk-cropper-instructions {
    margin: 6px 0 0;
    font-size: 14px;
    color: #555;
    line-height: 1.4;
}

.nk-cropper-close {
    background: none;
    border: none;
    font-size: 32px;
    line-height: 1;
    color: #666;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.nk-cropper-close:hover {
    color: #000;
}

/* Modal Body */
.nk-cropper-body {
    padding: 24px;
    flex: 1;
    overflow: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nk-cropper-container {
    width: 100%;
    max-width: 100%;
    height: 60vh;
}

/* Cropper.js v2 custom elements need explicit sizing */
.nk-cropper-container cropper-canvas {
    width: 100%;
    height: 100%;
}

.nk-cropper-container img {
    max-width: 100%;
    display: block;
}

/* Modal Footer */
.nk-cropper-footer {
    padding: 16px 24px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.nk-cropper-rotate-buttons {
    display: flex;
    gap: 8px;
}

.nk-cropper-action-buttons {
    display: flex;
    gap: 12px;
}

.nk-rotate-btn {
    padding: 6px 12px !important;
    font-size: 13px !important;
}

.nk-cropper-footer .button {
    padding: 8px 20px;
    font-size: 14px;
    line-height: 1.5;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.nk-cropper-footer .button-secondary {
    background: #f7f7f7;
    border: 1px solid #ccc;
    color: #555;
}

.nk-cropper-footer .button-secondary:hover {
    background: #fafafa;
    border-color: #999;
}

.nk-cropper-footer .button-primary {
    background: #2271b1;
    border: 1px solid #2271b1;
    color: #fff;
}

.nk-cropper-footer .button-primary:hover {
    background: #135e96;
    border-color: #135e96;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nk-cropper-modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .nk-cropper-header {
        padding: 16px 20px;
    }

    .nk-cropper-header h3 {
        font-size: 18px;
    }

    .nk-cropper-body {
        padding: 16px;
    }

    .nk-cropper-container {
        max-height: 50vh;
    }

    .nk-cropper-footer {
        padding: 12px 16px;
        flex-direction: column;
    }

    .nk-cropper-rotate-buttons {
        width: 100%;
        justify-content: center;
    }

    .nk-cropper-action-buttons {
        width: 100%;
        flex-direction: column;
    }

    .nk-cropper-footer .button {
        width: 100%;
    }
}
