/**
 * Image Cropper Modal Styles
 */

/* Modal Overlay */
.cropper-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.95);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
}

.cropper-modal.active {
    display: flex;
}

.cropper-container {
    background: var(--bg-secondary, #16161e);
    border-radius: 16px;
    padding: 25px;
    max-width: 600px;
    width: 90%;
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
    border: 1px solid rgba(220, 20, 60, 0.3);
}

.cropper-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cropper-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #fff;
    margin: 0;
}

.cropper-close {
    background: none;
    border: none;
    color: #888;
    font-size: 1.8rem;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    transition: color 0.2s;
}

.cropper-close:hover {
    color: #dc143c;
}

/* Cropper Preview Area */
.cropper-preview-area {
    position: relative;
    width: 100%;
    height: 350px;
    background: #0a0a0f;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cropper-image {
    max-width: 100%;
    max-height: 100%;
    display: block;
}

/* Crop Circle Overlay */
.crop-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.crop-circle {
    position: absolute;
    border: 3px dashed #dc143c;
    border-radius: 50%;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.6);
    cursor: move;
    pointer-events: all;
}

/* Controls */
.cropper-controls {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 20px;
}

.cropper-control-row {
    display: flex;
    align-items: center;
    gap: 15px;
}

.cropper-control-label {
    color: #aaa;
    font-size: 0.9rem;
    min-width: 70px;
}

.cropper-slider {
    flex: 1;
    height: 6px;
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    outline: none;
}

.cropper-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #dc143c;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(220, 20, 60, 0.5);
}

.cropper-slider::-moz-range-thumb {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #dc143c;
    cursor: pointer;
    border: none;
    box-shadow: 0 0 10px rgba(220, 20, 60, 0.5);
}

/* Action Buttons */
.cropper-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.cropper-btn {
    padding: 12px 25px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.cropper-btn-cancel {
    background: rgba(255, 255, 255, 0.1);
    color: #aaa;
}

.cropper-btn-cancel:hover {
    background: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.cropper-btn-save {
    background: linear-gradient(135deg, #dc143c 0%, #ff4444 100%);
    color: #fff;
    box-shadow: 0 0 20px rgba(220, 20, 60, 0.3);
}

.cropper-btn-save:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 25px rgba(220, 20, 60, 0.4);
}

.cropper-btn-save:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Preview Circle */
.cropper-result-preview {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 10px;
    margin-bottom: 20px;
}

.result-preview-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid rgba(220, 20, 60, 0.5);
}

.result-preview-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.result-preview-text {
    color: #888;
    font-size: 0.85rem;
}

.result-preview-text strong {
    color: #dc143c;
    display: block;
    margin-bottom: 3px;
}

/* Dynamic Background Theme */
.profile-theme-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.8;
    transition: background 1s ease;
}

/* Loading State */
.cropper-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #dc143c;
    font-size: 1rem;
}

.cropper-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #dc143c;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 0.8s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Mobile Responsive */
@media (max-width: 600px) {
    .cropper-container {
        width: 95%;
        padding: 15px;
    }
    
    .cropper-preview-area {
        height: 280px;
    }
    
    .cropper-actions {
        flex-direction: column;
    }
    
    .cropper-btn {
        width: 100%;
        text-align: center;
    }
}
