/* Estilos para el componente de recorte de imágenes */
.crop-dialog {
    max-width: 900px;
    width: 100%;
}

.crop-container {
    position: relative;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.crop-canvas-container {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    background: #ffffff;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    overflow: hidden;
}

.crop-canvas {
    display: block;
    max-width: 100%;
    cursor: crosshair;
}

.crop-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
}

.crop-control-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.crop-control-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #495057;
}

.crop-aspect-buttons {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.crop-aspect-button {
    padding: 5px 10px;
    border: 1px solid #dee2e6;
    background: #ffffff;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    transition: all 0.2s ease;
}

.crop-aspect-button:hover {
    background: #f8f9fa;
    border-color: #007bff;
}

.crop-aspect-button.active {
    background: #007bff;
    color: #ffffff;
    border-color: #007bff;
}

.crop-action-buttons {
    display: flex;
    gap: 10px;
}

.crop-reset-button {
    padding: 6px 12px;
    background: #6c757d;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background 0.2s ease;
}

.crop-reset-button:hover {
    background: #5a6268;
}

.crop-debug-button {
    padding: 6px 12px;
    background: #17a2b8;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background 0.2s ease;
    margin-left: 8px;
}

.crop-debug-button:hover {
    background: #138496;
}

.crop-debug-button.active {
    background: #dc3545;
    animation: pulse 2s infinite;
}

.crop-debug-button:disabled {
    background: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(220, 53, 69, 0); }
    100% { box-shadow: 0 0 0 0 rgba(220, 53, 69, 0); }
}

.crop-test-button {
    padding: 6px 12px;
    background: #6f42c1;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.875rem;
    transition: background 0.2s ease;
    margin-left: 8px;
}

.crop-test-button:hover {
    background: #5a2c8a;
}

.crop-test-button:disabled {
    background: #e9ecef;
    color: #6c757d;
    cursor: not-allowed;
}

.crop-preview-container {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.crop-preview-title {
    font-size: 0.875rem;
    font-weight: 500;
    color: #495057;
    margin-bottom: 10px;
}

.crop-preview-image {
    max-width: 200px;
    max-height: 200px;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    object-fit: cover;
}

.crop-info {
    margin-top: 15px;
    padding: 10px;
    background: #e9ecef;
    border-radius: 4px;
    font-size: 0.8rem;
    color: #495057;
}

.crop-info-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.crop-info-item:last-child {
    margin-bottom: 0;
}

.crop-instructions {
    background: #e3f2fd;
    border: 1px solid #bbdefb;
    border-radius: 4px;
    padding: 12px;
    margin-bottom: 15px;
    font-size: 0.875rem;
    color: #1976d2;
}

.crop-instructions h4 {
    margin: 0 0 8px 0;
    font-size: 0.9rem;
    font-weight: 600;
}

.crop-instructions ul {
    margin: 0;
    padding-left: 20px;
}

.crop-instructions li {
    margin-bottom: 4px;
}

.crop-error {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 4px;
    padding: 12px;
    margin-bottom: 15px;
    font-size: 0.875rem;
    color: #721c24;
}

.crop-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    color: #6c757d;
}

.crop-loading-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #007bff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.crop-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e9ecef;
}

.crop-footer-info {
    font-size: 0.8rem;
    color: #6c757d;
}

.crop-footer-actions {
    display: flex;
    gap: 10px;
}

/* Responsividad */
@media (max-width: 768px) {
    .crop-container {
        padding: 15px;
    }
    
    .crop-controls {
        flex-direction: column;
        gap: 15px;
    }
    
    .crop-aspect-buttons {
        justify-content: center;
    }
    
    .crop-action-buttons {
        justify-content: center;
    }
    
    .crop-footer {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .crop-footer-actions {
        order: -1;
    }
}

@media (max-width: 480px) {
    .crop-canvas-container {
        margin: 0 -10px;
    }
    
    .crop-aspect-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .crop-aspect-button {
        width: 100%;
        max-width: 120px;
    }
}

/* Animaciones */
.crop-fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.crop-slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Estados del cursor para el canvas */
.crop-canvas[data-cursor="crosshair"] {
    cursor: crosshair;
}

.crop-canvas[data-cursor="move"] {
    cursor: move;
}

.crop-canvas[data-cursor="nw-resize"] {
    cursor: nw-resize;
}

.crop-canvas[data-cursor="ne-resize"] {
    cursor: ne-resize;
}

.crop-canvas[data-cursor="sw-resize"] {
    cursor: sw-resize;
}

.crop-canvas[data-cursor="se-resize"] {
    cursor: se-resize;
}

.crop-canvas[data-cursor="n-resize"] {
    cursor: n-resize;
}

.crop-canvas[data-cursor="s-resize"] {
    cursor: s-resize;
}

.crop-canvas[data-cursor="w-resize"] {
    cursor: w-resize;
}

.crop-canvas[data-cursor="e-resize"] {
    cursor: e-resize;
}

/* Mejoras visuales */
.crop-preview-container {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
}

.crop-container {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid #e9ecef;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.crop-canvas-container {
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.crop-aspect-button {
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.crop-aspect-button:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
}

.crop-reset-button {
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.crop-reset-button:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    transform: translateY(-1px);
} 