/**
 * SuperSummits Image Cropper Styles
 * 
 * CSS für den Bildausschnitt-Dialog bei Speaker-Profilbildern
 */

/* Cropper Popup Overlay */
#image-cropper-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

#image-cropper-popup-overlay.active {
    display: flex !important;
}

/* Cropper Popup Container */
#image-cropper-popup {
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    border: 2px solid;
    border-image: linear-gradient(to bottom, #71c5ff, #1ca1ff) 1;
}

/* Popup Header */
#image-cropper-popup h3 {
    font-size: 1.4em;
    font-weight: bold;
    margin: 0 0 20px 0;
    color: #1d2327;
    display: flex;
    align-items: center;
    gap: 10px;
}

#image-cropper-popup h3::before {
    content: "✂️";
    font-size: 1.2em;
}

/* Info Text */
.cropper-info {
    background: #f0f6fc;
    border-left: 4px solid #2271b1;
    padding: 12px 15px;
    margin-bottom: 20px;
    border-radius: 0 4px 4px 0;
    font-size: 14px;
    color: #1d2327;
}

.cropper-info strong {
    color: #2271b1;
}

/* Cropper Container */
.cropper-container-wrapper {
    position: relative;
    width: 100%;
    max-width: 550px;
    margin: 0 auto 20px;
    background: #1d2327;
    border-radius: 8px;
    overflow: hidden;
}

.cropper-container {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    cursor: move;
    touch-action: none;
}

/* Bild im Cropper */
.cropper-image {
    position: absolute;
    max-width: none;
    max-height: none;
    user-select: none;
    -webkit-user-drag: none;
}

/* Crop-Bereich Overlay */
.crop-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

/* Die Crop-Box (der quadratische Ausschnitt) */
.crop-box {
    position: absolute;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.6);
    border: 2px dashed #fff;
    pointer-events: none;
}

/* Gitterlinien (Drittel-Regel) */
.crop-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.crop-grid::before,
.crop-grid::after {
    content: "";
    position: absolute;
    background: rgba(255, 255, 255, 0.3);
}

.crop-grid::before {
    left: 33.333%;
    top: 0;
    width: 1px;
    height: 100%;
    box-shadow: calc(100% / 3) 0 0 rgba(255, 255, 255, 0.3);
}

.crop-grid::after {
    top: 33.333%;
    left: 0;
    height: 1px;
    width: 100%;
    box-shadow: 0 calc(100% / 3) 0 rgba(255, 255, 255, 0.3);
}

/* Eckenmarker */
.crop-corner {
    position: absolute;
    width: 20px;
    height: 20px;
    border-color: #fff;
    border-style: solid;
    pointer-events: none;
}

.crop-corner-tl {
    top: -2px;
    left: -2px;
    border-width: 3px 0 0 3px;
}

.crop-corner-tr {
    top: -2px;
    right: -2px;
    border-width: 3px 3px 0 0;
}

.crop-corner-bl {
    bottom: -2px;
    left: -2px;
    border-width: 0 0 3px 3px;
}

.crop-corner-br {
    bottom: -2px;
    right: -2px;
    border-width: 0 3px 3px 0;
}

/* Cropper Controls */
.cropper-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.cropper-controls button {
    padding: 8px 16px;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    background: #f6f7f7;
    color: #1d2327;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 6px;
}

.cropper-controls button:hover {
    background: #f0f0f1;
    border-color: #2271b1;
    color: #2271b1;
}

.cropper-controls button:active {
    background: #dcdcde;
}

/* Vorschau-Bereich */
.cropper-preview-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    padding: 15px;
    background: #f6f7f7;
    border-radius: 8px;
}

.cropper-preview-label {
    font-size: 14px;
    color: #50575e;
    font-weight: 500;
}

.cropper-preview {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid #2271b1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    background: #dcdcde;
}

.cropper-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Button Area */
.cropper-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
    padding-top: 15px;
    border-top: 1px solid #dcdcde;
}

.cropper-buttons .cancel-button,
.cropper-buttons .custom-button {
    padding: 10px 24px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cropper-buttons .cancel-button {
    background: #f6f7f7;
    border: 1px solid #8c8f94;
    color: #1d2327;
}

.cropper-buttons .cancel-button:hover {
    background: #f0f0f1;
    border-color: #50575e;
}

.cropper-buttons .custom-button {
    background: linear-gradient(135deg, #1ca1ff, #0073aa);
    border: none;
    color: #fff;
}

.cropper-buttons .custom-button:hover {
    background: linear-gradient(135deg, #0073aa, #005a87);
}

/* Loading Indicator */
.cropper-loading {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10;
}

.cropper-loading.hidden {
    display: none;
}

.cropper-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f0f0f1;
    border-top-color: #2271b1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.cropper-loading-text {
    margin-top: 15px;
    font-size: 14px;
    color: #50575e;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive Anpassungen */
@media (max-width: 768px) {
    #image-cropper-popup {
        width: 95%;
        padding: 15px;
    }
    
    .cropper-container {
        height: 300px;
    }
    
    .cropper-preview {
        width: 80px;
        height: 80px;
    }
    
    .cropper-buttons {
        flex-direction: column;
    }
    
    .cropper-buttons button {
        width: 100%;
        justify-content: center;
    }
}

/* Status Messages */
.cropper-status {
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 14px;
    display: none;
}

.cropper-status.success {
    display: block;
    background: #d1e7dd;
    border: 1px solid #a3cfbb;
    color: #0a3622;
}

.cropper-status.error {
    display: block;
    background: #f8d7da;
    border: 1px solid #f1aeb5;
    color: #58151c;
}

.cropper-status.info {
    display: block;
    background: #cff4fc;
    border: 1px solid #9eeaf9;
    color: #055160;
}
